BAPI for post Tax Amount
Hi,
Please tell me BAPI for post Tax Amount.
Which tcode use for Post tax code, is it FB01 or FB60.
Regards
Jana
Hi,
Use BAPI_ACC_DOCUMENT_POST
TCodes
FB41 Post Tax Payable
FB05 Post with Clearing
FB01 Post Document
Edited by: Neenu Jose on Nov 18, 2008 1:15 PM
Edited by: Neenu Jose on Nov 18, 2008 1:16 PM
Edited by: Neenu Jose on Nov 18, 2008 1:17 PM
Edited by: Neenu Jose on Nov 18, 2008 1:18 PM
Similar Messages
-
Bapi for posting IR line item at a time
Hi....
Do we have a bapi for posting invoive receipt line item wise instead of posting the PO at a time......this wud be more precise for my requirement.....presently i'm using bapi_acc_document_post but this wud clear the document with single document number.....but i want it to be posted line item wise to see the amount individually item wise instead of combined one....similar to what we have in the IR which shows amount of individual items........This is an old bug that keeps popping up:
https://forums.lenovo.com/t5/T400-T500-and-newer-T-series/Vertical-scrolling-got-reset-everytime-I-use-Ultra-Nav-to-scroll/td-p/343477 -
BDC / Bapi For Post Incoming Payment (F-28)
Hi
Im creating BDC for F-28. But it got error coming out.
>> It says DB05B-PSZAH(02) is not an input field.
What I do is: First, I search for Line Item then Document Number. Then It return to basic list. Then I loop again for the second Line Item Number and Document Number.
I can activate the first amount but cannot for the next amount and so on.
Anybody could help me on this??
Is there any BAPI for Post Incoming Payment (F-28)?
Thank you.
Regards.i dont think there is a BAPI for this Transaction...
i have done a BDC on F-28 myself....pasting the code....hope it helps you....
*******NOTE********
the parameter in the subroutine is to see if there is a single document or multiple documents being posted.
FORM fill_bdc_data_f-28_9005 USING p_i_mult_doc TYPE c.
**BDC from screen 9005
DATA : l_amt_bdc(13), l_amt_bdc_remain(13), l_amt_bdc_mult(13),
l_amt_bdc_mult_remain(13), l_assignment(14), l_period(2),
l_amount(13).
CLEAR t_bdcdata.
REFRESH t_bdcdata.
PERFORM bdc_dynpro USING 'SAPMF05A' '0103'.
PERFORM bdc_field USING 'BDC_OKCODE' '=AB'. "OK CODE - doc overview
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-bldat.
PERFORM bdc_field USING 'BKPF-BLDAT' w_date. "cheque date
CLEAR w_date.
PERFORM bdc_field USING 'BKPF-BLART' i_blart. "doc type
PERFORM bdc_field USING 'BKPF-BUKRS' i_bukrs. "comp code
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BKPF-BUDAT' w_date. "posting date
CLEAR w_date.
l_period = sy-datum+4(2).
PERFORM bdc_field USING 'BKPF-MONAT' l_period. "period
PERFORM bdc_field USING 'BKPF-WAERS' 'INR'. "currency
PERFORM bdc_field USING 'BKPF-BKTXT' i_bankl. "doc. hdr. text
PERFORM bdc_field USING 'BKPF-XBLNR' i_xblnr. "Ref. Document No.
PERFORM bdc_field USING 'BSEG-ZUONR' i_zuonr. "Assignment(Depot Code)
PERFORM bdc_field USING 'RF05A-KONTO' i_bank_gl. "Bank GL acc
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
l_amount = bseg-wrbtr.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "Amount
PERFORM bdc_field USING 'BSEG-PRCTR' ''. "Profit Center
**open items data
PERFORM bdc_field USING 'RF05A-AGKOA' 'D'. "Acc type (D=customers)
PERFORM bdc_field USING 'RF05A-XNOPS' 'X'. "Std OIs check box
**end of first screen
**document overview screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0700'. "Overview Screen
PERFORM bdc_field USING 'BDC_CURSOR' 'RF05A-AZEI1(01)'. "cursor
PERFORM bdc_field USING 'BDC_OKCODE' '/00'. "OK CODE
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL Indicator
**for single document selected
CLEAR l_amt_bdc.
IF p_i_mult_doc = ''.
***new screen - next line item
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
**for single document, use the bouncing amount calculated earlier
l_amt_bdc = w_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc. "amount
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.
**if there is some remaining amount, then go for another line item
IF w_rem_amt_ant_bouncing > 0.
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-ZTERM'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-ENTER
l_amt_bdc_remain = w_rem_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'.
**AGAIN
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-SAVE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term -hardcoded
PERFORM bdc_field USING 'BSEG-SKFBT' l_amt_bdc_remain.
ENDIF.
**multiple documents
ELSE.
**initialize remaining amount to amt entered on screen
l_amt_bdc_mult_remain = bseg-wrbtr.
LOOP AT t_seldoc_ant_bouncing.
IF l_amt_bdc_mult_remain > 0.
IF bseg-wrbtr > t_seldoc_ant_bouncing-rem_amt.
l_amt_bdc_mult = t_seldoc_ant_bouncing-rem_amt.
ELSE.
l_amt_bdc_mult = bseg-wrbtr.
ENDIF.
**remaining amt = screen amt - amt calculated above.
l_amt_bdc_mult_remain = l_amt_bdc_mult_remain - l_amt_bdc_mult.
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult. "amount
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
**posting key 19 for all but last document
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL
ENDIF.
ENDLOOP.
ENDIF.
**post remaining amount
IF p_i_mult_doc = 'X'.
**new screen if there is some amount left
IF l_amt_bdc_mult_remain > 0.
**posting key 15 with remaining amount
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term - hardcoded
ELSE.
**if no amount is left, no need for a further line item
PERFORM bdc_field USING 'RF05A-NEWBS' ''. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' ''. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
ENDIF.
ENDIF.
**clear variables
CLEAR : l_amount, l_assignment, l_amt_bdc,
l_amt_bdc_remain,l_amt_bdc_mult, l_amt_bdc_mult_remain.
ENDFORM. " fill_bdc_data_F-28_9005 -
Credit note for sales tax amount
Dear All,
I have a problem, my client is billed the sales tax amount but that customer is not liable for sales tax and accounting document also cleared. Now they want to give the credit note only for Sales tax amount and they wanted only tax account should debited and customer account should credited in the accounting entries.
Is that possible without any base price to create a credit note for sales tax amount?
But i have suggested that to create invoice correction request in that two entries are coming and i have make the tax to ZERO for second line item .But it is working fine for one case that is without excise duty in the original invoice and in the second case original invoice is having excise duty then excise entries also showing in the accounting document,.
Please anybody can help me out. Thanks in advance.
Thanks,
NarasimhaDear Narasimha
I have one suggestion.
First check under which G/L Account, the tax amount has been debited.
Go to F-02, at the bottom, you can see [PstKy] Input a relevant posting key which is assigned to credit entries (better to check with your FI consultant) and input the above G/L Account in the next column and execute. In the subsequent screen, input the sales tax amount, Budiness Area and Value date and proceed.
Once you save F-02, in FS10N, the entries would be adjusted that is one the wrongly debited tax amount, one credit entry would be flowing. But I am not sure about accounting document whether this adjustment will get updated there or not.
thanks
G. Lakshmipathi -
Function modules or BAPI for posting plan costs for WBS Element
Hi all,
Does anyone know, whether there exists a function module or BAPI for posting plan costs to a WBS Element? K_COSTS_PLAN_PS does not work, because RKP1 is not allowed.
Greetingscheck
BAPI_COSTACTPLN_POSTACTINPUT Activity Input Planning: Posting
BAPI_COSTACTPLN_POSTACTOUTPUT Activity/Price Planning: Posting
BAPI_COSTACTPLN_POSTKEYFIGURE Stat. Key Figure Planning: Postings
BAPI_COSTACTPLN_POSTPRIMCOST Primary Cost Planning: Postings
BAPI_PDTRANSCO_POSTPRIMCOST Transfer of Planning Data: Post Primary Costs
K40C CO Actual Postings, Manual
BAPI_ACC_PRIMARY_COSTS_POST Accounting: Post Primary Costs
BAPI_COPAACTUALS_POSTCOSTDATA BAPI Operating Concern: Post Costing-Based Actua
BAPI_PRIM_COST_CHECK_AND_POST Primary Costs: Formal Parameter Check
S@meer -
Bapi for posting Outbound Delivery
Hi,
Can anyone please let me know about bapi for posting goods issue of outbound delivery.I have checked bapi like
BAPI_OUTB_DELIVERY_CONFIRM_DEC
If i use the with this bapi i can't cancellation the outbound with vl09.
thanks,hi,
i try to doing posting goods issue for outbound delivery out fo the regular progression.
the posting is automaticly as part of outside program.
thanks alot, -
Function Module/BAPI for posting of Parked Invoice/Documnet
Dear all,
Please provide me.
Function Module/BAPI for posting of Parked Invoice/Documnet
Regards
RickyHi Ricky,
What about MR_POST_PP_INVOICE?
In my current project, though, we had to develop a function module for this.
Regards,
Eli -
ECC 5.0 BAPI for posting documents only in non-leading ledger
Hello,
for an FI-interface i want to call an BAPI for posting the documents. The document were posted to the leading ledger and to the non-leading ledger by usage of BAPI_ACC_DOCUMENT_POST.
Now there are cases to post documents only to the non-leading ledger.
Is there anywhere a possibility to tell the BAPI (e.g. enter the ledger group) only to post to the non-leading ledger or is another BAPI available to do so.
Thank you for your help.
ThomasHi Thomas,
You can use the same BAPI for any type of ledger postings. You can restrict your postings to Type of ledger.
Cheers
Srinivas -
BAPI for post held invoice ?
Hi,
Is there a BAPI for posting held invoices?
I have to post held invoices in background....I hope there is other option, then CALL TRANSACTION.
I'm on release R/3 4.70x200, but it seems for BUS2081/IncomingInvoice there is no relevant BAPI.
Method Edit was also implemented via transaction MIR4.
OSS note 381593 mention that batch input problems with invoice related transactions. MIR4 is only mentioned as keyword, however I might have problems with it later on.
Any comment?
Can anyone on higher release check if there is relevant BAPI for this?
Thanks in advance,
PeterHi Peter,
You can use the following addition in the fm MRM_PARKED_INVOICE_POST call..
CALL FUNCTION 'MRM_PARKED_INVOICE_POST'
EXCEPTIONS
error_message = 1.
IF sy-subrc NE 0.
****Use syst message variables here..
ENDIF.
This will catch the error messages that terminate the process..
Hope this helps..
Sri -
Are there any standard Idocs or Bapis for posting the data into transaction
Hi,
Are there any standard Idocs or Bapis for posting the data into transactions ME42N and IK11?
Thank You.Thank you.
Any idea of the other one? -
BAPI for posting outbound delivery (VL01n)
Hi,
I need some help in finding correct function module or BAPI for posting outbound delivery (VL01n), the requirement is I need delivery created with reference to sales order and must take following input.
1. Shipping Point
2. Sales Order
3. Selection Date
4. Delivery type
I tried some existing ones and some do not have delivery type input and some without Shipping Point input.
Please let me know.
Regards
Ram.Hi
Please avoid the duplicate post .It is not as per the Forum rules.
You have posted the same question with this title in ABAP General Forum:
Outbound Delivery BAPI/Function module
Neha -
Where do I need to populate the Tax amount in BAPI_ACC_DOCUMENT_POST inorder to create Vendor Invoice (Non PO) - FB60.
I have populated Tax information GL A/c, Condition key, Account key, Tax Code in u2018ACCOUNTTAXu2019 table and Tax amount $7 in 'CURRENCYAMOUNT' table but got below errors:
u2018Balance in transaction currencyu2019 - when we have $-107in Vendor line, $100 in GL line & $7 in Tax line. (It showing difference $7).
The tax amount must not be greater than the tax baseu2019 - When we have $-107 in Vendor line, $107 in GL line & $7 in Tax line.
Here is the code, please check and suggest me:
Header Details:
it_documentheader-obj_type = u2018BKPFFu2019.
it_documentheader-doc_date = u201811/08/2011u2019.
it_documentheader-pstng_date = u201811/08/2011u2019.
it_documentheader-comp_code = u20180001u2019.
it_documentheader-ref_doc_no = u2018TESTQ108u2019.
it_documentheader-doc_type = u2018KRu2019.
it_documentheader-obj_key = u2018$u2019.
it_documentheader-username = sy-uname.
it_documentheader-bus_act = u2018RFBUu2019.
it_documentheader-fisc_year = u20182011u2019.
Vendor Line u2013 Accounts Payable
lv_item_no = 1.
it_accountpayable-itemno_acc = u20181u2019.
it_accountpayable-vendor_no = u20187800988u2019.
it_accountpayable-comp_code = u20180001u2019.
it_accountpayable-pmnttrms = u2018DUBPu2019.
it_accountpayable-tax_code = u2018I1u2019.
it_accountpayable-taxjurcode = u2018000003749u2019.
it_accountpayable-item_text = u2018Test123u2019.
Populate currency amount for account payable data
it_currencyamount-itemno_acc = u20181u2019.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = -107.
it_currencyamount-amt_base = 100.
Append it_currencyamount.
G/L Account data
it_accountgl-acct_type = u2018Su2019. " GL
it_accountgl-itemno_acc = u20182u2019.
it_accountgl-gl_account = u2018623000u2019.
it_accountgl-item_text = u2018Test123u2019.
it_accountgl-costcenter = u20181099u2019.
it_accountgl-profit_ctr = u20181u2019.
it_accountgl-comp_code = u20180001u2019.
it_accountgl-tax_code = u2018I1u2019.
it_accountgl-taxjurcode = u2018000003749u2019.
Append it_accountgl.
it_currencyamount-itemno_acc = u20182u2019.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = 100.
Append it_currencyamount.
Tax Line Details:
it_accounttax-itemno_acc = '3'.
it_accounttax-gl_account = '0000210000'.
it_accounttax-acct_key = 'NVV'.
it_accounttax-cond_key = 'XP1I'.
it_accounttax-tax_code = 'I1'.
Append it_accounttax.
it_currencyamount-itemno_acc = '3'.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = 7.
it_currencyamount-amt_base = 100.
Append it_currencyamount.Hi
See this [post|BAPI_ACC_DOCUMENT_POST and partial non deductible VAT;. It's related with Note 487064 - Direct posting to tax account with AC BAPIs.
I hope this helps you
Regards
Eduardo -
Posting tax amount without tax code
Hi all,
I have one condition Diff which i made condition category as taxes (As per client requirement they want to post rounding amount as taxes to G/L) But when i m posting the invoice to account system is showing the error " Tax Code invalid in Tax procedure"
where i want to post this amount as tax to G/L without any tax code.
Pls suggest me how can i achieve this
Regards
ShambhuHi...
Maintain Account Key ( ERS) for that Condition Type in your pricing procedure.Then create one new G/L account for this 'DIFF'. Now goto VKOA here assign the G/L with relavant combinations.
Regards
Jyohti. -
BAPI for posting accounting documents
Hi,
Can anyone please provide me with the BAPI to be used for GL postings with example.Hi,
Use the BAPI BAPI_ACC_DOCUMENT_POST for posting Documents.
Check the sample code related to posting.
REPORT acc_bapi_document .
selection-screen begin of block bl01 .
parameters:
check_l radiobutton group rb1,
check_a default 'X' radiobutton group rb1,
post radiobutton group rb1.
selection-screen uline.
parameters:
rev_c radiobutton group rb1,
rev_p radiobutton group rb1.
selection-screen uline.
parameters:
ref_key like bapiache01-obj_key default 'TEST000001BAPICALL',
dest like bdi_logsys-logsys default ' '.
selection-screen end of block bl01 .
data:
gd_documentheader like bapiache09,
gd_customercpd like bapiacpa09,
gd_fica_hd like bapiaccahd,
it_accountreceivable like table of bapiacar09 with header line,
it_accountgl like table of bapiacgl09 with header line,
it_accounttax like table of bapiactx09 with header line,
it_criteria like table of bapiackec9 with header line,
it_valuefield like table of bapiackev9 with header line,
it_currencyamount like table of bapiaccr09 with header line,
it_return like table of bapiret2 with header line,
it_receivers like table of bdi_logsys with header line,
it_fica_it like table of bapiaccait with header line,
it_accountpayable like table of bapiacap09 with header line,
it_paymentcard like table of bapiacpc09 with header line,
it_ext like table of bapiacextc with header line.
it_re LIKE TABLE OF bapiacre09 WITH HEADER LINE,
it_ext2 LIKE TABLE OF bapiparex WITH HEADER LINE.
perform fill_internal_tables.
if check_l = 'X'.
call function 'BAPI_ACC_DOCUMENT_CHECK'
destination dest
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of check lines:'. "#EC NOTEXT
perform show_messages.
endif.
if check_a = 'X'.
call function 'BAPI_ACC_DOCUMENT_CHECK'
destination dest
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of check all:'. "#EC NOTEXT
perform show_messages.
endif.
if post = 'X'.
data: l_type like gd_documentheader-obj_type,
l_key like gd_documentheader-obj_key,
l_sys like gd_documentheader-obj_sys.
if dest = space or
dest = gd_documentheader-obj_sys.
post synchron
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
importing
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of post:'. "#EC NOTEXT
perform show_messages.
else.
create Idoc
it_receivers-logsys = dest.
append it_receivers.
call function 'ALE_ACC_DOCUMENT_POST'
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
paymentcard = it_paymentcard
contractitem = it_fica_it
extension2 = it_ext2
realestate = it_re
receivers = it_receivers
COMMUNICATION_DOCUMENTS =
APPLICATION_OBJECTS =
exceptions
error_creating_idocs = 1
others = 2 .
if sy-subrc = 0.
write: / 'IDoc created'. "#EC NOTEXT
else.
write: sy-msgid.
endif.
endif.
endif.
if rev_p = 'X' or rev_c = 'X'.
data: rev like bapiacrev,
rev_key like ref_key.
rev_key = ref_key.
rev_key(1) = 'R'.
rev-obj_type = gd_documentheader-obj_type.
rev-obj_key = rev_key.
rev-obj_sys = gd_documentheader-obj_sys.
rev-obj_key_r = ref_key.
if rev_c is initial.
if dest = space or
dest = gd_documentheader-obj_sys.
call function 'BAPI_ACC_DOCUMENT_REV_POST'
exporting
reversal = rev
bus_act = gd_documentheader-bus_act
tables
return = it_return.
else.
it_receivers-logsys = dest.
append it_receivers.
call function 'ALE_ACC_DOCUMENT_REV_POST'
exporting
reversal = rev
busact = gd_documentheader-bus_act
OBJ_TYPE = 'BUS6035'
SERIAL_ID = '0'
tables
receivers = it_receivers
COMMUNICATION_DOCUMENTS =
APPLICATION_OBJECTS =
exceptions
error_creating_idocs = 1
others = 2
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
write: / 'IDoc created'. "#EC NOTEXT
endif.
endif.
else.
call function 'BAPI_ACC_DOCUMENT_REV_CHECK'
exporting
reversal = rev
bus_act = gd_documentheader-bus_act
tables
return = it_return.
endif.
write: / 'Result of Reversal Posting:'. "#EC NOTEXT
perform show_messages.
endif.
commit work.
Form fill_internal_tables
form fill_internal_tables.
perform fill_header.
perform fill_accountgl.
perform fill_accountar.
perform fill_accountap.
perform fill_accounttax.
perform fill_currencyamount.
perform fill_criteria.
perform fill_valuefield.
perform fill_re.
perform fill_cpd.
perform fill_contractitem.
perform fill_contractheader.
perform fill_paymentcard.
perform fill_extension.
endform. " fill_internal_tables
Form Show_messages
form show_messages.
if it_return[] is initial.
write: / 'no messages'.
else.
skip 1.
loop at it_return.
write: / it_return-type,
(2) it_return-id,
it_return-number,
(80) it_return-message,
IT_RETURN-LOG_NO
IT_RETURN-LOG_MSG_NO
it_return-message_v1,
IT_RETURN-MESSAGE_V2
IT_RETURN-MESSAGE_V3
IT_RETURN-MESSAGE_V4
(20) it_return-parameter,
(3) it_return-row,
it_return-field.
IT_RETURN-SYSTEM
endloop.
endif.
uline.
endform. " Show_messages
FORM fill_accountgl *
form fill_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 2.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010101'.
it_accountgl-comp_code = 'SLOC'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 3.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010101'.
it_accountgl-comp_code = 'SLOC'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 5.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010301'.
it_accountgl-comp_code = 'SLOC'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 6.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010301'.
it_accountgl-comp_code = 'SLOC'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 7.
it_accountgl-itemno_acc = 8.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '90'.
it_accountgl-profit_ctr = '0000900008'.
it_accountgl-comp_code = 'CORP'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 8.
it_accountgl-itemno_acc = 9.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '90'.
it_accountgl-profit_ctr = '0000900008'.
it_accountgl-comp_code = 'CORP'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
endform. "fill_accountgl
FORM fill_header *
form fill_header.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = gd_documentheader-obj_sys.
OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
gd_documentheader-obj_type = 'IDOC'.
gd_documentheader-obj_key = ref_key.
gd_documentheader-username = sy-uname.
gd_documentheader-header_txt = 'BAPI Test'. "#EC NOTEXT
gd_documentheader-obj_key_r =
GD_DOCUMENTHEADER-reason_rev =
gd_documentheader-comp_code = 'SLOC'.
GD_DOCUMENTHEADER-AC_DOC_NO =
gd_documentheader-fisc_year = sy-datum(4).
gd_documentheader-doc_date = sy-datum.
gd_documentheader-pstng_date = sy-datum.
GD_DOCUMENTHEADER-TRANS_DATE =
GD_DOCUMENTHEADER-VALUE_DATE =
GD_DOCUMENTHEADER-FIS_PERIOD =
gd_documentheader-doc_type = 'KR'.
gd_documentheader-ref_doc_no = 'xxxx'.
GD_DOCUMENTHEADER-COMPO_ACC =
gd_documentheader-bus_act = 'RFBU'.
endform. "fill_header
FORM fill_contractheader *
form fill_contractheader.
gd_fica_hd-doc_no =
gd_fica_hd-doc_type_ca =
gd_fica_hd-res_key =
gd_fica_hd-fikey =
gd_fica_hd-payment_form_ref =
endform. "fill_contractheader
FORM fill_cpd *
form fill_cpd.
gd_customercpd-name
gd_customercpd-name_2
gd_customercpd-name_3
gd_customercpd-name_4
gd_customercpd-postl_code
gd_customercpd-city
gd_customercpd-country
gd_customercpd-country_iso
gd_customercpd-street
gd_customercpd-po_box
gd_customercpd-pobx_pcd
gd_customercpd-pobk_curac
gd_customercpd-bank_acct
gd_customercpd-bank_no
gd_customercpd-bank_ctry
gd_customercpd-bank_ctry_iso
gd_customercpd-tax_no_1
gd_customercpd-tax_no_2
gd_customercpd-tax
gd_customercpd-equal_tax
gd_customercpd-region
gd_customercpd-ctrl_key
gd_customercpd-instr_key
gd_customercpd-dme_ind
gd_customercpd-langu_iso
endform. "fill_cpd
FORM fill_ar *
form fill_accountar.
CLEAR it_accountreceivable.
it_accountreceivable-itemno_acc =
it_accountreceivable-customer =
IT_ACCOUNTRECEIVABLE-REF_KEY_1 =
IT_ACCOUNTRECEIVABLE-REF_KEY_2 =
IT_ACCOUNTRECEIVABLE-REF_KEY_3 =
IT_ACCOUNTRECEIVABLE-PMNTTRMS =
IT_ACCOUNTRECEIVABLE-BLINE_DATE =
IT_ACCOUNTRECEIVABLE-DSCT_DAYS1 =
IT_ACCOUNTRECEIVABLE-DSCT_DAYS2 =
IT_ACCOUNTRECEIVABLE-NETTERMS =
IT_ACCOUNTRECEIVABLE-DSCT_PCT1 =
IT_ACCOUNTRECEIVABLE-DSCT_PCT2 =
IT_ACCOUNTRECEIVABLE-PYMT_METH =
IT_ACCOUNTRECEIVABLE-DUNN_KEY =
IT_ACCOUNTRECEIVABLE-DUNN_BLOCK =
IT_ACCOUNTRECEIVABLE-PMNT_BLOCK =
IT_ACCOUNTRECEIVABLE-VAT_REG_NO =
IT_ACCOUNTRECEIVABLE-ALLOC_NMBR =
it_accountreceivable-item_text =
IT_ACCOUNTRECEIVABLE-PARTNER_BK =
IT_ACCOUNTRECEIVABLE-GL_ACCOUNT =
it_accountreceivable-comp_code
it_accountreceivable-bus_area
it_accountreceivable-pmtmthsupl
it_accountreceivable-paymt_ref
it_accountreceivable-scbank_ind
it_accountreceivable-businessplace
it_accountreceivable-sectioncode
it_accountreceivable-branch
it_accountreceivable-pymt_cur
it_accountreceivable-pymt_cur_iso
it_accountreceivable-pymt_amt
it_accountreceivable-c_ctr_area
it_accountreceivable-bank_id
it_accountreceivable-supcountry
it_accountreceivable-supcountry_iso
it_accountreceivable-tax_code
it_accountreceivable-taxjurcode
it_accountreceivable-tax_date
it_accountreceivable-sp_gl_ind
it_accountreceivable-partner_guid = '1465464654'.
APPEND it_accountreceivable.
endform. "fill_accountar
FORM fill_ap *
form fill_accountap.
clear it_accountpayable.
it_accountpayable-itemno_acc = 1.
it_accountpayable-vendor_no = '0000060259'.
it_accountpayable-vendor_no = '0000060693'.
it_accountpayable-gl_account
it_accountpayable-ref_key_1
it_accountpayable-ref_key_2
it_accountpayable-ref_key_3
it_accountpayable-comp_code = 'SLOC'.
it_accountpayable-bus_area = '01'.
it_accountpayable-pmnttrms = 'A000'.
it_accountpayable-bline_date
it_accountpayable-dsct_days1
it_accountpayable-dsct_days2
it_accountpayable-netterms
it_accountpayable-dsct_pct1
it_accountpayable-dsct_pct2
it_accountpayable-pymt_meth
it_accountpayable-pmtmthsupl
it_accountpayable-pmnt_block
it_accountpayable-scbank_ind
it_accountpayable-supcountry
it_accountpayable-supcountry_iso
it_accountpayable-bllsrv_ind
it_accountpayable-alloc_nmbr
it_accountpayable-item_text = 'BAPI Test A/P line item'. "#EC NOTEXT
it_accountpayable-po_sub_no
it_accountpayable-po_checkdg
it_accountpayable-po_ref_no
it_accountpayable-w_tax_code
it_accountpayable-businessplace
it_accountpayable-sectioncode
it_accountpayable-instr1
it_accountpayable-instr2
it_accountpayable-instr3
it_accountpayable-instr4
it_accountpayable-branch
it_accountpayable-pymt_cur
it_accountpayable-pymt_amt
it_accountpayable-pymt_cur_iso
it_accountpayable-sp_gl_ind
append it_accountpayable.
endform. "fill_accountap
FORM fill_tax *
form fill_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 4.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-cond_key = 'MWVS'.
it_accounttax-itemno_tax = 8.
append it_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 7.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-COND_KEY = 'MWVS'.
append it_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 10.
it_accounttax-itemno_acc = 9.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-cond_key = 'MWVS'.
it_accounttax-itemno_tax = 4.
append it_accounttax.
endform. "fill_accounttax
FORM fill_currencyamount *
form fill_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 1.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '-7408036.2'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 2.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '5336472.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 3.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '3840.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 4.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '5548.00'.
it_currencyamount-amt_doccur = '832.2'.
it_currencyamount-amt_doccur = '576.00'.
it_currencyamount-amt_base = '3840.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 5.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '2051279.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 6.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '1690.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 7.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '1690.00'.
it_currencyamount-amt_doccur = '253.5'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 8.
it_currencyamount-itemno_acc = 7.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '13905.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 9.
it_currencyamount-itemno_acc = 8.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '2.70'.
it_currencyamount-amt_doccur = '18.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 10.
it_currencyamount-itemno_acc = 9.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '2.70'.
it_currencyamount-amt_base = '18.00'.
append it_currencyamount.
endform. "fill_currencyamount
FORM fill_criteria *
form fill_criteria.
CLEAR it_criteria.
it_criteria-itemno_acc = 2.
it_criteria-fieldname = 'BZIRK'.
it_criteria-character = '000001'.
append it_criteria.
endform. "fill_criteria
FORM fill_valuefield *
form fill_valuefield.
CLEAR it_valuefield.
it_valuefield-itemno_acc = 2.
it_valuefield-fieldname = 'VV010'.
it_valuefield-curr_type
it_valuefield-currency = 'EUR'.
it_valuefield-currency_iso
it_valuefield-amt_valcom
it_valuefield-base_uom
it_valuefield-base_uom_iso
it_valuefield-qua_valcom
append it_valuefield.
endform. "fill_valuefield
FORM fill_extension *
form fill_extension.
CLEAR it_ext.
it_ext-field1
it_ext-field2
it_ext-field3
it_ext-field4
APPEND it_ext.
DATA: ls_zzz TYPE ZZZ_ACCIT.
CLEAR it_ext2.
it_ext2-structure = 'ZZZ_ACCIT'.
ls_zzz-posnr = 2.
ls_zzz-awref_reb = '123654'.
ls_zzz-aworg_reb = '654654'.
ls_zzz-grant_nbr = '0022002'.
MOVE ls_zzz TO it_ext2-valuepart1.
APPEND it_ext2.
endform. "fill_extension
FORM fill_paymentcard *
form fill_paymentcard.
CLEAR it_paymentcard.
it_paymentcard-itemno_acc = 1.
it_paymentcard-cc_glaccount
it_paymentcard-cc_type
it_paymentcard-cc_number
it_paymentcard-cc_seq_no
it_paymentcard-cc_valid_f
it_paymentcard-cc_valid_t
it_paymentcard-cc_name
it_paymentcard-dataorigin
it_paymentcard-authamount = '100'.
it_paymentcard-currency = 'EUR'.
it_paymentcard-currency_iso
it_paymentcard-cc_autth_no
it_paymentcard-auth_refno
it_paymentcard-auth_date
it_paymentcard-auth_time
it_paymentcard-merchidcl
it_paymentcard-point_of_receipt
it_paymentcard-terminal
it_paymentcard-cctyp = '1'.
APPEND it_paymentcard.
endform. "fill_paymentcard
FORM fill_contractitem *
form fill_contractitem.
CLEAR it_fica_it.
it_fica_it-itemno_acc
it_fica_it-cont_acct
it_fica_it-main_trans
it_fica_it-sub_trans
it_fica_it-func_area
it_fica_it-fm_area
it_fica_it-cmmt_item
it_fica_it-funds_ctr
it_fica_it-fund
append it_fica_it.
endform. "fill_contractitem
*& Form fill_re
form fill_re .
CLEAR it_re.
it_re-itemno_acc =
it_re-business_entity =
it_re-building =
it_re-property =
it_re-rental_object =
it_re-serv_charge_key =
it_re-settlement_unit =
it_re-contract_no =
APPEND it_re.
endform. "fill_re
Please check these links
http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
http://www.sapfans.com/forums/viewtopic.php?p=76232&sid=b6519d31b5097f49dc303d03b35eed43
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561
Regards,
Raj. -
Function Module/BAPI for Posting with Residual Clearing
Hello All,
I want to know whether any Function Module/BAPI avaialble for posting with residual clearing (FB05). Can we do residual clearing using the FM "Posting_Interface_Clearing"?
Please let me know how this can be handled.
Thanks in advance.
With Regards,
Senthil.Hi senthil ,
Look at these threads
POSTING_INTERFACE_CLEARING
bapi for Transfer posting with clearing
BAPI_ACC_GL_POSTING_POST for FB05
Question about POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_START
Regards,
Gaurav
Maybe you are looking for
-
Mailbox server web services proxy issue
One of our 3 mailbox servers gives us an error when mailbox databases are mounted on it. All web services are not functioning properly, there is an event log error for each web service web.config file saying file not found, If I open each web.config
-
Adding an existing webspage to own site
This one's bit difficult to describe so bear with me! The website I look after (call it site A) is looking to have the page of another website (site B) appear within it (the other one has numerous RSS feeds on it which appear with a brief summary). A
-
How to update JTable when clicking outside the table?
Hi (Sorry if this has been asked before but I can't seem to see exactly how to do this from previous posts.) I have a JTable which sits on a jPanel which itself is part of a frame. When I click anywhere outside the table when I'm editing a cell in th
-
trying to connect a content engine 590 to a cisco router which will have web-cache enabled. The diagram is like this: pc (lan)- fa0/0router-isp. the engine is on the same lan of fa0/0. One question bother me is the keyword "in" and "out" from ip wccp
-
hi color the text and the cell to same color. so that the tex should get disappear. is that possible..example?