Ansicht
Dokumentation

J_1UN_TAXGEN_BADI - BAdI: Enhancement of Tax Invoice Reports

J_1UN_TAXGEN_BADI - BAdI: Enhancement of Tax Invoice Reports

RFUMSV00 - Advance Return for Tax on Sales/Purchases   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Financial Accounting (FI) component. You can use it to do the following:

  • Change the content of tax invoices and correction tax invoices that are created by the Create Tax Invoices and Corrections(J_1UNCREATE_EXT) program.
  • Change the output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT)
  • Change the data in the view Document Numbers in Register (transaction J1UF_REE_NUM)
  • Change the data in annex 1 of the VAT return, which is generated by the report VAT Return (transaction J1UFTAX21)
  • Change the output of the reports Printing of Outgoing Tax Invoices (transaction J1UFPODNAC), Printing of Outgoing Correction Tax Invoices (transaction J1UFCORRPODNAC), and Checklist for Outgoing Tax-Relevant Documents (transaction J1UFRVN_NEW)
  • Turn off material substitution, which is always on by default for Creating Tax Invoices and Corrections(transaction J1UNCREATEEXT). If material substitution is turned on, the original and substitution materials are processed as a single material.

This BAdI contains the following BAdI methods:

  • CHANGE_SGTXT - You can use this method to enter contract data in the BSEG-SGTXT field of tax invoices and correction tax invoices. The method is called by the Create Tax Invoices and Corrections(J_1UNCREATE_EXT) program for each tax invoice or correction tax invoice to be generated. The method is called before the report creates the batch input with the document data.
    For more information, see SAP Note 1548923.
  • CONVERT_BELNR_OUTPUT - You can use this method to change the numbering of documents in the ALV and XML output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT) according to client-specific rules. The method is called before the output is generated.
  • PODATK_NAKL_CORR_DATE_NN - You can use this method to change the tax invoice date in the tables in annex 1 of the VAT return. The method is called by the report VAT Return (transaction J1UFTAX21).
  • PODATK_NAKL_CORR_DATE_NK - You can use this method to change the correction tax invoice date in the tables in annex 1 of the VAT return (called by the report VAT Return (transaction J1UFTAX21)) and when correction tax invoice is created (transaction J1UNCREATEEXT).
  • PODATK_NAKL_PAYMENT_TYPE - You can use this method to change the payment type in the print form that is generated by the reports Printing of Outgoing Tax Invoices (transaction J1UFPODNAC) and Printing of Outgoing Correction Tax Invoices (transaction J1UFCORRPODNAC).
  • PODATK_NAKL_MATNR_STAWN - You can use this method to define the material ID and description in the output of the reports Printing of Outgoing Tax Invoices (transaction J1UFPODNAC), Printing of Outgoing Correction Tax Invoices (transaction J1UFCORRPODNAC), and Checklist for Outgoing Tax-Relevant Documents (transaction J1UFRVN).
  • REGISTER_PUR - You can use this method to add additional purchasing documents from external sources to the output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT).
  • REGISTER_SAL - You can use this method to add additional sales documents from external sources to the output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT).
  • REGISTER_DISPLAY_DOCUMENT - You can use this method to open documents from other systems by double-clicking the relevant documents in the ALV output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT). This can be used for documents that cannot be opened from the standard tables or transactions.
  • REGISTER_PUR_LINE - You can use this method to edit purchasing document lines in the output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT) after the report has retrieved the document data.
  • REGISTER_SAL_LINE - You can use this method to edit sales document lines in the output of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT) after the report has retrieved the document data.
  • TAXVOUCHCORR_TITLE_DATA - You can use this method to change the titles in the output of the reports Printing of Outgoing Tax Invoices (transaction J1UFPODNAC) and Printing of Outgoing Correction Tax Invoices (J1UFCORRPODNAC).
  • TAXVOUCHCORR_LINE_DATA - You can use this method to change the line data in the output of the reports Printing of Outgoing Tax Invoices (transaction J1UFPODNAC) and Printing of Outgoing Correction Tax Invoices (J1UFCORRPODNAC).
  • REGISTER_COMPANY_NAME - You can use this method to change the company code name in the title of the report Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT) and in XML file J1201505 (for example, to differentiate between different business areas). You can also use it to initialize or change the name and ID of the director and the accountant.
  • REGISTER_REE_NUM - You can use this method to change the table lines before the system saves data to the view Document Numbers in Register (transaction J1UF_REE_NUM). Note the following:
  • If a new line is to be inserted into the table IV_OPERATION = I

  • If a line is to be updated in the table IV_OPERATION = U

  • SUBSTITUTION_CHECK - You can use this method to turn off material substitution for Creating Tax Invoices and Corrections (transaction J1UNCREATEEXT) by clearing parameter C_SUBSTITUTE.
  • PROFORMA_ASSIGN - You can use this method to provide an invoice-proforma number for a down payment item. By default, the number is taken from Business Partner Reference Key (field XREF2).
  • GET_SD_ITEMS_EXTENSION - You can use this method to modify material prices when Billing invoices not released to Financial Accounting are processed. If the new price is different from Calculated Price (field NETWR converted into the local currency) divided by position Quantity (field FKIMG) including rounding, then the calculated price will be kept, the document will be marked with a yellow light and a warning message will be saved to the log.
  • REDEFINE_MEMO_ITEMS - You can use this method to change how you create tax documents for credit/debit memos in the Special Down Payment Processingmode of the program Create Tax Invoices and Corrections (J_1UNCREATE_EXT). You can change the contents of the tax documents to be created, exclude memos from processing, define the type of the tax documents to be created, define correction reasons, and define references to different tax invoices.
  • REDEFINE_SD_ITEMS - You can use this method to modify material position parameters during:
  • Processing of invoices

  • Processing of memos

  • Processing of down payments and down payment returns with reference to sales orders

  • Processing of down payments with cash.

  • CONVERT_BELNR_OUTPUT - You can use this method to change document numeration in the Register of Incoming and Outgoing Tax Invoices (transaction J1UF_IN_OUT), Printing of Outgoing Tax Invoices(transaction J1UFPODNAC) and Printing of Outgoing Correction Tax Invoices (J1UFCORRPODNAC) reports. This method changes document numeration depending on client-specific rules before output to ALV and XML.
  • NK_ITEMS_SORT - This method may be called to change the way the system selects items of invoices and tax invoices for down payments that will be included into tax corrections. The system makes this selection when the Create Tax Invoices and Corrections(J_1UNCREATE_EXT) program prepares data to create correction tax invoices for documents that clear down payments against invoices in Special Down Payment Processing mode with the Compare Materials in Inv. and Tax Doc. on related DP option selected. Please note that this method is not called when there are invoices in the document chain that must be processed with Cash Method.
  • NK_FILL_POS_NUM_XML - You can use this method to define whether the system will change XML values during output of a Correction Tax Invoice and whether it will display an ALV list with Correction Tax Invoice positions matched with their corresponding Tax Invoice positions. Its parameters are:
  • IS_REF_TI_DOC - contains a table with XML values of the original Tax Invoice for which the Correction Tax Invoice is being created.

  • IT_REF_CTI_DOCS - contains a table with current XML values of the Correction Tax Invoice.

  • CS_CTI_DOC - changes the XML values of the Correction Tax Invoice.

  • CV_ALV_CALL - changes whether the system will display the ALV list with matched positions.

  • OUTGOING_TI_ALV1 - You can use this method to change documents before output to the first ALV-based screen
  • OUTGOING_TI_ALV2 - You can use this method to change documents before output to the second ALV-based screen
  • IS_ALPHA_DOC_NUM - If you use alpha-numeric documents number range for outgoing primary documents, you can use this method to allow processing of such documents to avoid errors when references are checked (BKPF-BKTXT, BKPF-XBLNR). Parameters are:
  • CV_BELNR_POS - Number of alpha positions in BKPF-BELNR

  • CV_VBELN_POS - Number of alpha positions in VBRK-VBELN

If value is 0 (default), this means that alpha-chars are not allowed in document numbers and they are checked for digits only.
Please note that this BADI enables processing of numbers of outgoing primary documents only, tax invoices document numbers must be digital.
  • CHECK_PARKED_DOC - check parked document before posting into accounting
  • REDEFINE_HTYPR - redefine reason HTYPR when XML is created for TI/CTI
  • IS_PROCESS_SD_DOCUMENT - You can use this method to determine whether the program Create Tax Invoices and Corrections (J_1UNCREATE_EXT) will process a billing document. The program calls this method when you choose to create tax invoices Based on SD Invoices not released to FI. When you want the program to process the billing document, set parameter CV_SHOULD_PROCESS to 'X'.
  • GET_TAX_DOCUMENT - You can use this method to return ordinary and special Tax Invoices and Corrective Tax Invoices for the source document.
  • BEFORE_CREATE_TI - You can use this method to change header, item or tax data before tax invoice or corrective tax invoice are created. The method is called from function module J_1UF_CREATE_TI for the following cases:
    J1UF_IN_OUT (program J_1UF_REGISTER_IN_OUT):
    - creating outgoing TI based on incoming TI
    - creating special CTIs (correct errors in tax number of buyer, in header attributes, etc)
    - creating outgoing CTI without TI
    J1UFMATCHING (program J_1UFDI_MATCHING_XML_WITH_FI):
    - creating incoming ordinary or summary TI/CTI

For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).

For information about implementing BAdIs as part of the enhancement framework, see SAP Library for SAP NetWeaver Platform on SAP Help Portal at http://help.sap.com/nw_platform. Choose a release and then Application Help. In SAP Library, choose SAP NetWeaver Library: Function-Oriented View -> Application Server -> Application Server ABAP -> Application Development on AS ABAP -> ABAP Customer Development -> Enhancement Framework.






rdisp/max_wprun_time - Maximum work process run time   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 14833 Date: 20240523 Time: 185151     sap01-206 ( 346 ms )