2016 Feb 09 9:56 AM
Can anyone tell me how to Enhance the FQEVENTS in ISU.
i have one requirement like i need to achieve the Tax aggregate billing with out configuration changes. I need to enhance the events that are tagged to the Billing and achieve this functionality.
Please help!!
2016 Feb 09 10:03 AM
Hi,
This is more generic question, please do research in this SAP for Utilities space in SCN, check the below document by Bill:
Thanks,
Srini
2016 Feb 09 10:24 AM
Hi Srini,
Thanks for your reply.
But i need to do TAX Aggreegate Billing by enhancing the event R413 .
Please can u tell me how to do that.
Attached sample function module for the event is ISU_SAMPLE_R413
2016 Feb 09 11:09 AM
Hi Madhuri,
I don't have your exact requirement here, but my understanding is that you want to change the TAX code determined during Billing or Invoicing in IS-U.
For this, make a copy of the given standard sample FM ISU_SAMPLE_R413 and assign this to the event as explained in the document How to use FQEVENTS
Now in the custom FM, you can replace the VAT code already determined by the billing/invoicing as per the account determination in EK02.
Following parameters might be used to meet your requirement:
Table TY_ERCHZ_MWSKZ will have the line items from billing which are relevant to posting and this can be changed as per your needs.
Please read the event documentation for further technical reference, mainly as shown below:
If you want to change the standard tax determination function, change the corresponding tax information for a billing line in table TY_ERCHZ_MWSKZ. Note that the entry in the ERCHZ_KEY structure uniquely represents the billing line and table T_MWSKZ contains the amount to be taxed with the tax indicator.
You can only change the entries in the TY_ERCHZ_MWSKZ table. After the event, the following checks are performed:
- For each billing line there must be one entry in the TY_ERCHZ_MWSKZ table
- The sum of the amount to be taxed must be equal to the net amont of the billing line.
If the tax determination is during Invoicing then this event will be triggered during invoicing, you can check yours under the following config;
spro -> SAP Utilities -> Invoicing -> Basic Settings -> Define Basic Settings for Invoicing
Can you also check this discussion - if this is related to your requirement?
Hope this helps.
Thanks,
Srini
2016 Feb 09 11:45 AM
Hi Srini,
We have to calculate VAT at Individual price item level and replace the Tax Amount coming out from the Function module ISU_SAMPLE_R413 with the amount calculated by our own code.
For this purpose if i copy the Function module and create new custom Function module where can attach the custom module?
And where do we attach the Custom Function module in the FQEVENTS?
2016 Feb 09 12:34 PM
Hi Madhuri,
You can attach your custom FM for this event R413 under the place where customer-specific (or installation-specific text) section which is at the bottom of the tab 'Function Modules'. Use the pencil icon to change the customisation for the event and add your own function module, start the sequence number from 0 (or 1) depending on your previous assignment if any.
Thanks,
Srini
2016 Feb 09 2:27 PM
Thanks Srini.
But my main issue here is the Sample Function module ISU_SAMPLE_R413 is not getting triggered while creating BILL from EA19.
If it triggers i wanted to see how the VAT is getting calculated and what all parameters are getting filled related to amount in the Function module.
2016 Feb 09 3:14 PM
Hi Madhuri,
Standard Sample FM ISU_SAMPLE_R413 will not be triggered as this is just for customer reference and this is use to copy into custom FM.
Expected steps:
Other points to be noted:
A) Check your config for 'Time for tax determination' under pro -> SAP Utilities -> Invoicing -> Basic Settings -> Define Basic Settings for Invoicing
B) Make sure you are not running Invoice in simulation mode
Parameters filled for this FM are:
IMPORT:
X_PARAM contains Invoicing related Parameters used
X_UNIT_PARAM contains additional Invoicing Parameters
X_BUPA - contains BP related data
X_FKKVK - contains Contract Account header data (structure FKKVK)
X_FKKVKP - contains Contract Account Partner-Specific (structure FKKVKP)
TABLES:
T_CONTRCL - contains Contract details
T_BILL_DOC - contains all Billing Document line items
T_OPEN_ITEM - contains all the Open Items being included in this Invoice (struct.FKKCL)
TY_ERCHZ_MWSKZ - contains the Billing Line items which are relevant to posting.
Only table which you can edit in this event is TY_ERCHZ_MWSKZ this contains all the Billing Line Items for which VAT is being calculated .
This contains following two fields:
erchz_key - Billing Doc and Billing line item for billing documents:
erchz_belnr LIKE erchz-belnr,
erchz_belzeile LIKE erchz-belzeile,
t_mwskz - Tax information for billing lines:
erchz_key TYPE isu21_erchz_key,
t_mwskz TYPE isu21mwskz OCCURS 2,
Note that the entry in the ERCHZ_KEY structure uniquely represents the billing line and table T_MWSKZ contains the amount to be taxed with the tax indicator.
If you want to change the tax code, then in your custom logic add or change the tax code field MWSKZ under T_MWSKZ[1]-MWSKZ or T_MWSKZ[1]-BETRW amount etc...
Thanks,
Srini
2016 Feb 09 3:15 PM
Thanks alot. I will try this and get back to you.
This is very helpful!!