In BAPI_ACC_DOCUMENT_POST usage of function Calc. Tax automatically
Hi All,
I am using the BAPI '<b>BAPI_ACC_DOCUMENT_POST'</b> to post FI documents.
I want to use the functionality 'Calculate Tax automatically'
Field [BKPF-XMWST].
Is there any way to mention this in BAPI.
Please provide me your valuable suggestions.
Thanks and regards,
Siva
I have the same problem. How can I differentiate documents with or without automatic tax calculation when I use BAPI_ACC_DOCUMENT_POST?
Any idea?
Thanks and Rgrds,
György
Similar Messages
-
Problem with "Tax Code" and "Calculate tax automatically" fields
Hi again.
I have made a program which posts account documents through the BAPI_ACC_DOCUMENT_POST function module, and, since there were some fields which weren't available for me to fill having the FM by itslef, I have implemented the AC_DOCUMENT BAdI.
All document data is provided by means of an SAP XI interface, through a Z IDoc.
When I create the Account Receivable (and/or Payable) structure, I fill, through the BAdI, the BKPF-XMWST (Calculate tax automatically) and BSEG-MWSKZ (Tax code) fields. However, even the resulting posted document does have the Tax Information fields completed (the ones in the BSET table), the BAPI doesn't create the tax position automatically (just like the FB01 or FB60 transactions do). Note that the amounts are sent in their gross value by the interface (that's why the debit and credit sides remain consistent and the document is posted correctly).
How can I have that position created? Is there a function module which I can call or something?
Thanks a lot in advance.Hi
I only use the fm CALCULATE_TAX_FROM_NET_AMOUNT or CALCULATE_TAX_FROM_GROSSAMOUNT in order to get all information I need to transfer to the BAPI. Both fms return the data by table parameter T_MWDAT.
U can read this table and get all information u need, these code is from my old program, I hope it can help you:
- Calculate tax data:
CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
EXPORTING
I_BUKRS = BUK_TO
I_MWSKZ = T_BASE-MWSKZ_OUT
I_WAERS = _BKPF-WAERS
I_WRBTR = T_BASE-WRBTR
TABLES
T_MWDAT = T_MWDAT
EXCPTIONS.
IF SY-SUBRC <> 0.
ELSE.
* Load tax item
LOOP AT T_MWDAT.
CLEAR W_GL_ITEM.
W_GL_ITEM-HKONT = T_MWDAT-HKONT.
W_GL_ITEM-MWSKZ = T_BASE-MWSKZ_OUT.
IF T_BASE-KBETR = T_MWDAT-KBETR.
W_GL_ITEM-WRBTR = T_BASE-FWSTE.
ELSE.
W_GL_ITEM-WRBTR = T_MWDAT-WMWST.
ENDIF.
W_GL_ITEM-IVA = 'X'.
W_GL_ITEM-KTOSL = T_MWDAT-KTOSL.
W_GL_ITEM-TXJCD = T_MWDAT-TXJCD.
W_GL_ITEM-KSCHL = T_MWDAT-KSCHL.
W_GL_ITEM-TXJCD_DEEP = T_MWDAT-TXJCD_DEEP.
W_GL_ITEM-TXJLV = T_MWDAT-TXJLV.
W_GL_ITEM-BASE = T_BASE-WRBTR.
COLLECT W_GL_ITEM INTO GL_ITEM.
- Append GL or Tax item for the BAPI
LOOP AT GL_ITEM INTO W_GL_ITEM .
ITEMNO_ACC = ITEMNO_ACC + 1.
IF W_GL_ITEM-IVA = SPACE.
* GL item
ELSE.
* Tax item
ACCOUNTTAX-ITEMNO_ACC = ITEMNO_ACC.
ACCOUNTTAX-TAX_CODE = W_GL_ITEM-MWSKZ.
ACCOUNTTAX-ACCT_KEY = W_GL_ITEM-KOSTL.
ACCOUNTTAX-COND_KEY = W_GL_ITEM-KSCHL.
ACCOUNTTAX-TAXJURCODE = W_GL_ITEM-TXJCD.
ACCOUNTTAX-TAXJURCODE_DEEP = W_GL_ITEM-TXJCD_DEEP.
ACCOUNTTAX-TAXJURCODE_LEVEL = W_GL_ITEM-TXJLV.
APPEND ACCOUNTTAX.
PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR W_GL_ITEM-BASE.
ENDIF.
ENDLOOP.
Max
Edited by: max bianchi on Nov 25, 2009 7:43 PM -
Requirement for getting the VAT Taxes automatically from the vendor invoice
Dear All,
We Have a Requirement for getting the VAT Taxes automatically from the vendor invoice in to the Sales invoice after invoice verification process.Is this feasible?. Can anybody explain how this can be done to overcome this issue.
Thanking you,
Best regards,
R.Srinivasanhi,
technically i do not think tht can be done. but even from functional part its incorrect in the sense tht the values on which tax is calculated in purchase may be very different from tht in sales. so we may never get the correct picture.
saurabh -
How to pass the check 'calculate Tax Automatically' in IDOC
Hi,
I need mark the check box in the 'calculate Tax Automatically' in the IDOC. The IDOC will then go to BDC session 'FB01' to post. Which program I should to make the modification and what IDOC structure has this XMWST field?
Any help is appreciated!
Thanks,
HelenI am trying to do the same using INVOIC01 MM and MIRO
I found an OSS note that I thought may help but found a few anomolies.
Solution
The user exit CUSTOMER-FUNCTION '015' is available in the subroutine MRM_DOCUMENT_COMPLETE (include LMRMH1F). In this user exit, the "Calculate Tax" indicator (XMWST) can be set automatically for the IDoc.
Here the field e_rbkpv-xmwst must be set to 'x' in the structure e_rbkpv. In addition, f_change must be set to 'x'.
The Include is not LMRM1F but LMRMHFOT, in this include if I change the two fields rbkpv-xmwst and f_change in debugging, it works. There must be a way to do this!
We already do this using FI posting with INVOIC02 and the calculate taxes is flagged when you set calculate taxes on net amount in FB00.
Any suggestions would be gratefully recieved.
Thanks Ian -
Functional module for automatic creation of pur requisition & pur order
hello,
what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
please let me know as early as possible
regards,
rajesh kumar rajuHi,
Please check with following.
IDOC_INPUT_ACC_PURCHASE_REQUI
IDOC_INPUT_ACC_PURCHASE_ORDER
/ISDFPS/OR_PURCHASE_ORDER_CR
BS01_PURCHASE_DOCUMENT_CREATE
CO_MP_CREATE_PURCHASE_ORDER
Thanks & Regards
Sadhu Kishore -
Function of Tax code in tax determination
1.What is the function of Tax code in tax determination, and where it is assigned ?
2.What is the use of VAT registration number in Control Tab page in Cusomer master ? Does it effect the tax determination in a transaction ?Hi Sunil,
1. Tax code determines the percentage of tax on purchases
Steps for Tax determination:
Define Condition Types
Define Procedures --- You need to define the tax calculation procedure for your country
Select the calculation procedure / control data------- give the Procedure for tax determination
You create the tax code at Tcode-- FTXP
There you provide the tax percentages for the tax code
Define the tax account the Account key (OB40), which will be an account determination
2. VAT registration No in customer master will be used for any kind of tax exemptions if applicable
There can be impact inthe tax determination as the customer is entitled for the exemption.
Award points if useful,,
Thanks and regards,
Sri -
Functionality of 'Assign Automatically'
Dear Experts,
What is the functionality of 'Assign Automatically' available in workload redistribution?
St. Purchasing -> Workload Redistribution -> 'Assign Automatically'. I have selected an Bid Invitation and click the above button. Nothing happens.
Worklad redistribution happens two ways
1. Manually, the purchasing manager can assign a work item to a purchaser?
2. Using Badi BBP_Pgrp_Determine.
So, what is the functionality of 'Assign Automatically>
Any input will be highly appreciated.
Thanks and regards,
RanjanSort the results list.
Use the hyperlinks in the column headers to sort the documents in ascending or descending order. Click the hyperlinks in the Item column to view the detailed display for the document.
Select documents from the results list for assignment.
Have the system automatically assign the selected documents to purchasing groups, based on the assignment rules defined in the BAdI BBP_PGRP_ASSIGN_BADI.
You see an overview of the reassigned documents that shows the source and target purchasing groups. The system redistributes the documents among the new purchasing groups in the background, and displays any relevant messages. A success message is displayed when processing is complete. -
The find function used to automatically scroll to the instance of the word I was looking for. Now it doesn't. How do I fix this?
== This happened ==
Every time Firefox opened
== a few months agoHmm... you're right. I don't have access to that Google Doc, but our support.mozilla.com weekly metrics are on Google Docs, and I see the same issue there.
https://spreadsheets.google.com/ccc?key=0Aibg4PvTbjUKcGlBLWEtZFhDTDJwN3ZCNXBUdTBIS0E&hl=en#gid=0
It may be specific to Google spreadsheets (and whether or not you have permission to edit the doc). I'm currently trying to find out if that's a Firefox bug, or a Google bug. If you use the '''Ctrl-F''' keyboard shortcut, Google's Find feature takes over, so they obviously want people using their Find utility. -
OS:RH71
ORACLE RELEASE 8.1.7
what's the usage of function dbms_standard.client_ip_address of
sys? THX.Johnny.Danger wrote:
We have a somewhat mini scale network. We have anywhere from 40 to 60 ranging from WLan and Lan devices. Right now we have been using opendns for content filtering but we would like to limit certain sites to just certain groups and if someone goes onto a site they shouldn't then what we would like to know is the IP of the user and there mac address If we could somehow find a captive portal software or hardware that would be perfect because it takes a lot of guess work out of things. We use Apple Wireless router's and run 2 server's one running Mac OSX Server 10.6.7 and a 2nd server running the same which act's as our OD replica
So my question is what do you guys use?
Were looking for the more user friendly the better and by that i mean I don't want to be using ww-rt on some router or something
Thank you for your time.
Have a look at Vicomsoft and their Intergate Inspect package. This runs on a Mac server and lets you link to Open Directory for authenticating users and lets you set filtering for users or for groups of users. Sounds exactly what you want.
See http://www.vicomsoft.com/products/filter/index.html -
F110: Regulate the usage of UPD when executing automatic payment
Hi all,
Thank you for your advice always.
Did anyone have a know-how to regulate the usage of UPD, when executing automatic payment?
At first, the program uses a BGD process in the application server specified in "target computer", but it seems to submit tasks to UPD process in all application servers. As a result, all UPD processes are occupied, and other tasks become unprocessed.
Additional info: in our environment, end users usually logon through logon group over four application servers. Do you think we can solve this problem by asking end users to logon to the specific application server?
Otherwise, I assume there will be two approaches for this problem.
One is to execute automatic payment carefully in order to avoid long time occupation of the UPD processes, even if we can not stop UPD processes being occupied for some time. Currently in our system, UPD processes are occupied for long time (e.g. 1 hour) Another approach is to regulate the usage of UPD as I wrote above. It's approach from the Basis system administration.
Any comment will be very appreciated.
Best Regards,
NorifumiHi all,
Thank you for your advice always.
Did anyone have a know-how to regulate the usage of UPD, when executing automatic payment?
At first, the program uses a BGD process in the application server specified in "target computer", but it seems to submit tasks to UPD process in all application servers. As a result, all UPD processes are occupied, and other tasks become unprocessed.
Additional info: in our environment, end users usually logon through logon group over four application servers. Do you think we can solve this problem by asking end users to logon to the specific application server?
Otherwise, I assume there will be two approaches for this problem.
One is to execute automatic payment carefully in order to avoid long time occupation of the UPD processes, even if we can not stop UPD processes being occupied for some time. Currently in our system, UPD processes are occupied for long time (e.g. 1 hour) Another approach is to regulate the usage of UPD as I wrote above. It's approach from the Basis system administration.
Any comment will be very appreciated.
Best Regards,
Norifumi -
Unable to calculate Tax automatically 11.5.10.2
Hello All,
We have created two Tax codes AP(Input) and AR(output). on the sales order i am choosing Tax Code from LOV, but when i am saving the sales order Tax is not calculating automatically. its happening only from Actions button(Calculate Tax) manually.
please advise me...
thanks
Vijay
Edited by: user12180635 on Aug 24, 2012 6:14 AMHello,
In AR Transaction Type you have tax calculation check box check this. Maybe it is a bug.
From manual:
Tax Calculation at Entry
With tax calculation at Entry, tax is calculated as each order line is entered. This ax
calculation is used, for example, in businesses that requires the user performing
Note: The Copy Order functionality does not copy tax amounts;
tax is recalculated for the new order.
Define Tax Features order entry to view the total of the order, including tax, so it can be quoted to a
customer.
To include tax in Commitment Applied Amount, set the tax event to Entry.
Regards,
Luko -
FUNCTION MODULE FOR AUTOMATIC MAIL GENERATION
Hello,
I want to generate an automatic mail of a scheduled report on everyday basis.
the output spool req of scheduled report in generated n saved inside the system.
Could you please help me in generating automatic mail through that saved spool request?
Regards,
Krutikahi,
use:
DATA: lv_filesize TYPE i,
lv_buffer TYPE string,
lv_attachment TYPE i,
lv_testo TYPE i.
DATA: li_pdfdata TYPE STANDARD TABLE OF tline,
li_mess_att TYPE STANDARD TABLE OF solisti1,
li_mtab_pdf TYPE STANDARD TABLE OF tline,
li_objpack TYPE STANDARD TABLE OF sopcklsti1,
li_objtxt TYPE STANDARD TABLE OF solisti1,
li_objbin TYPE STANDARD TABLE OF solisti1,
li_reclist TYPE STANDARD TABLE OF somlreci1,
li_objhead TYPE soli_tab.
DATA: lwa_pdfdata TYPE tline,
lwa_objpack TYPE sopcklsti1,
lwa_mess_att TYPE solisti1,
lwa_objtxt TYPE solisti1,
lwa_objbin TYPE solisti1,
lwa_reclist TYPE somlreci1,
lwa_doc_chng TYPE sodocchgi1.
CONSTANTS: lc_u TYPE char1 VALUE 'U',
lc_0 TYPE char1 VALUE '0',
lc_1 TYPE char1 VALUE '1',
lc_pdf TYPE char3 VALUE 'PDF',
lc_raw TYPE char3 VALUE 'RAW',
lc_ordform TYPE char15 VALUE 'ZORDCONFIRM_01',
lc_attachment TYPE char10 VALUE 'ATTACHMENT'.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = lc_pdf
max_linewidth = 132
IMPORTING
bin_filesize = lv_filesize
TABLES
otf = pv_otfdata
lines = li_pdfdata
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT li_pdfdata INTO lwa_pdfdata.
TRANSLATE lwa_pdfdata USING ' ~'.
CONCATENATE lv_buffer lwa_pdfdata INTO lv_buffer.
CLEAR lwa_pdfdata.
ENDLOOP.
TRANSLATE lv_buffer USING '~ '.
DO.
lwa_mess_att = lv_buffer.
APPEND lwa_mess_att TO li_mess_att.
CLEAR lwa_mess_att.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Object with PDF.
REFRESH li_objbin.
li_objbin[] = li_mess_att[].
DESCRIBE TABLE li_objbin LINES lv_attachment.
Object with main text of the mail.
lwa_objtxt = space.
APPEND lwa_objtxt TO li_objtxt.
CLEAR lwa_objtxt.
DESCRIBE TABLE li_objtxt LINES lv_testo.
Create the document which is to be sent
lwa_doc_chng-obj_name = text-008.
lwa_doc_chng-obj_descr = text-008.
lwa_doc_chng-sensitivty = lc_0.
lwa_doc_chng-obj_prio = lc_1.
lwa_doc_chng-doc_size = lv_testo * 225.
Pack to main body.
CLEAR lwa_objpack-transf_bin.
header
lwa_objpack-head_start = 1.
The document needs no header (head_num = 0)
lwa_objpack-head_num = 0.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_testo.
lwa_objpack-doc_type = lc_raw.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
Create the attachment.
Fill the fields of the packing_list for the attachment:
lwa_objpack-transf_bin = gc_x .
header
lwa_objpack-head_start = 1.
lwa_objpack-head_num = 1.
body
lwa_objpack-body_start = 1.
lwa_objpack-body_num = lv_attachment.
lwa_objpack-doc_type = lc_pdf.
lwa_objpack-obj_name = lc_attachment.
lwa_objpack-obj_descr = text-008.
lwa_objpack-doc_size = lv_attachment * 255.
APPEND lwa_objpack TO li_objpack.
CLEAR lwa_objpack.
lwa_reclist-receiver = pv_emailid.
lwa_reclist-rec_type = lc_u.
lwa_reclist-notif_del = gc_x.
lwa_reclist-notif_ndel = gc_x.
APPEND lwa_reclist TO li_reclist.
IF li_reclist IS NOT INITIAL.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = gc_x
TABLES
packing_list = li_objpack
object_header = li_objhead
contents_bin = li_objbin
contents_txt = li_objtxt
receivers = li_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF. -
BAPI_ACC_DOCUMENT_POST for debtor with withholding tax
Hello,
I'm using the BAPI_ACC_DOCUMENT_POST to generate debtor invoices applying withholding tax.
In order to obtain the withholding tax information, I'm using structure ACCOUNTWT, but when the document FI is generated, it has not line item for withholding tax, and table WITH_ITEM has no values for basis amount and withholding tax import, though the withholding indicator is there.
With help of a colleague from basis team, I've been debugging the process and all the parameters seem to be OK. So I guess there's something missing that is doing table WITH_ITEM is being informed incorrectly.
Another point is that I'm not sure if it's necesary to inform component SECTIONCODE (Withholding tax section) in structure BAPIACAR09 (Debtor position), and in this case, which value it expects to be passed.
Could you, please, help me with this issue? Any idea will be welcome.
Many thanks in advance.
Best regards,
Miriam.Hi Maurizio,
Many thanks for your reply!
I've checked the parameters you said, and they seem not filled. I'm going to ask a basis colleague for analyzing what's missing and doing the corresponding modifications.
Thank you very much once again
Regards,
Miriam. -
How to use Round off function in TAX Formula
Dear All,
I have to do Round off in the Tax Formula. Hence I was suggested by the SAP Forum Team to use Round off function in the Tax Formulae.
But sir I don't know how to use Round off function in the Tax Formulae.
For Eg. BaseAmt = Total
TaxAmt = BaseAmt * Rate
Now within this Eg. How will i use the Round off function and where i will use it.
Please guide me with example.
Regards
Hitesh ParsawalaHi Hitesh,
you can do like this
Cess_ST_TaxAmt=Round(Cess_ST_BaseAmt*Cess_ST_Rate,0)
where you can introduce rounding function by choosing from dropdown available in Operation and by click on Insert.
It will post following in formulla window
Round (Number, Decimals as Number)
where in parameter you have to give 1.Number-which is to be round and 2.Decimals as Number-as per your requirement like by 2 decimal or 0 decimal
If required give me call,
BR
Samir Gandhi -
Error with Function Module for Automatically Reversing FI Documents
We are trying to use BAPIACREV to automatically reverse a document as part of workflow but get an error with 2 of the import parameters stating they were never transferred:
1) OBJ_KEY_R
2) OBJ_SYS
Does anyone know how to resolve this?Hi,
OBJ_KEY : Reference Key
This key value must be created while posting the document and this key must be maintained in any of SAP tables
for example : If the it is Accounting document then all detail found in BKPF and BSEG table, you can find OBJ_KEY in BKPF-AWKEY field.
OBJ_SYS : Logical system of source document
Logical system may be maintained in some table.
for example : If the it is Accounting document then all detail found in BKPF and BSEG table, you can find OBJ_SYS in BKPF-AWSYS field.
or you can use following FM to get logical system
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
OWN_LOGICAL_SYSTEM = L_V_OWN_LOGICAL_SYSTEM
EXCEPTIONS
OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
OTHERS = 2
Maybe you are looking for
-
I want to upgrade my OS from 10.6.8
I have a macbook 4,1 late 2008 running osx 10.6.8. I want to upgrade my OS. Is it the only latest os i can use or can i upgrade to any other latest os than this??
-
How to get payment term of a sale order ?
hi, in transaction VA02, How can we know the payment term a document ? it is stored in which table ? Thanks.
-
How do you make a secure pdf form editable?
How do you make a secure pdf file editable?
-
LIKE and Type in abap statements
Hello All , I have a question regarding the 'Like' and' Type' I have created a badi XXX , The method has a changing parameter 'A' which is referenced to a structure . The typing method I have mentioned in the method ( in the parameter list ) is TY
-
Is old 845E Max the same as 845E Max (HT ready)?
Hi:) I've got MSI 6566 845E Max mainboard. But the only mainboard i found on http://www.msi.com.tw is 845E Max (HT ready). Can i use driver, firmware etc updates if they r for 845E Max (HT ready) to my mainboard? And finally, can i mount a Intel HT p