8

Blog series on Define Compliance Reports : Create a New Report Definition for VA...

 3 years ago
source link: https://blogs.sap.com/2021/06/15/blog-series-on-define-compliance-reports-create-a-new-report-definition-for-vat-reporting/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Technical Articles
Posted on June 15, 2021 14 minute read

Blog series on Define Compliance Reports : Create a New Report Definition for VAT Reporting

2 Likes 29 Views 1 Comment

This blog post is a part of the multi-part series of blogs on the Define Compliance Reports application. In the set of blog posts, we cover the end-to-end process of creation and interconnection of various artifacts required for reporting compliance via S/4HANA for advanced compliance reporting (ACR). In this blog post, we will cover how to create a “report definition” from scratch.

In the compliance reporting process, you may need to create new report definitions to adhere to the reporting requirements specified by authorities or to address organization-specific requirements over and above those specified by the authorities. Creation of a Report Definition in ACR is essentially a seven-step process: assign parameters, queries, schema, document, correspondence definitions, and so on.

The Define Compliance Reports app provides you with an intuitive wizard that takes you through the following steps required for creating report definitions.

RD-Steps-Overview.jpg

Let us take the example of one of the most common compliance reports, Value Added Tax(VAT) report here to showcase the steps in detail. We’ll build a generic VAT report which would provide output in ALV format. The output provided would consist of:

  • Summary: Displays the total input tax, total output tax, total non-deductible tax, and the net tax payable for the reporting period.
  • Output VAT Summary: Displays the output VAT at a transaction, tax code, and tax rate level.
  • Output VAT Detail: Displays details of the output VAT at a document level.
  • Input VAT Summary: Displays the input VAT at a company code, transaction, tax code, and tax rate level.
  • Input VAT Detail: Displays details of the input VAT at a document level.
  • Balances Per Company Code: Displays a tax summary at the company code, transaction key, tax code, and tax rate level.
  • Box Level Amount Summary: Displays details of tax boxes, tax box type (B-Base/T-Tax), and amount.

   Selection Parameters:

The report requires the following selection parameters to generate the required output:

  • Company Code – The company code is an organizational unit within financial accounting. Typically, VAT reporting is done at the company code level.
  • Reporting Date – Beginning and end date of the relevant reporting period. (monthly, quarterly as per the legal requirement).
  • Include Deferred Tax – Deferred tax refers to either a positive (asset) or negative (liability) entry on a company’s balance sheet regarding tax owed or overpaid due to temporary differences. With deferred tax, once the invoice is paid, the deferred tax is transferred to a target tax code by a program. It is normally only the target tax that can be processed in the taxes on sales/purchases report. Select Yes if you want the report output to include details of documents posted with deferred taxes. By default, the value of this selection parameter is No.
  • Include MOSS Tax – VAT MOSS tax codes are not reported in the advance return for tax on sales/purchases but in the Mini One-Stop Shop procedure. These tax codes can also be selected here for reconciliation purposes. When this indicator is set, tax reporting line items with a MOSS tax code are also selected and processed. Select Yes if you want the report output to include details of documents posted with MOSS tax codes. By default, the value of this selection parameter is No.

Let us look at the individual steps in detail.

  1. Open Define Compliance Reports Application and Click on ‘Add’ to create a new report definition.
  2. img1-11.jpg                                                                                                                                                     
  3. img2-2.jpg
    • Enhanced Mode: Choose Enhanced mode to create a report definition with the full capabilities and features.  This is the recommended option to create new reports.
    • Classic Mode: If you want to generate a legal report with limited ACR functionalities using an existing ABAP report, you can choose this option. In a Cloud environment, reports with classic mode are not supported.

    In case you want to extend an SAP delivered a standard report, you can choose the check box. We’ll cover Report Extensibility in detail in a subsequent blog in this series.

    In our scenario, we will create a report from scratch with ‘Enhanced Mode’ providing the capabilities and features of ACR.

    img3-3.jpgimg4-2.jpg

  4. Parameters:

    You can specify the name of the parameters that appear on the selection screen while executing a report run in the Run Compliance Reports app. You can set the parameter properties such as

    • Optional
    • Hidden
    • Multiple Selection
    • Read-only

    To add parameters, perform the following steps:

    A. In the Parameters section, choose the Add pushbutton.img5.jpgB. Enter the parameter name. Note that, while adding organizational units as selection screen parameters, use the exact organizational unit IDs as parameter names.img6.jpg
    C. Select the data element. Data Element defines an elementary data type or reference type from the SAP Data Dictionary. You can associate the report parameters with predefined metadata elements available in the SAP system.img06.jpgimg07.jpgimg08.jpg

    D. Specify search help and search help parameters. Search helps are objects that you can use to assign input help (F4 Help) to the screen fields. You can select from the pre-defined search help objects to enable input help (F4 Help) for the parameters on the selection screen.img6-1.jpgE. Set the other properties for parameter, such as, multiple selection, optional, read-only, and hidden as per the reporting requirements.For our VAT report: Company code and Reporting Date are mandatory parameters. Include Deferred Tax and Include MOSS Tax are optional parameters.

    img09.jpgF. Choose OK.img10.jpg

  5. Queries:

    Queries help you to fetch data when you generate compliance documents in the Run Compliance Reports app. You can create your own queries that can be assigned to elements as data sources during mapping.

    For our VAT report, we need queries to provide Input tax summary and detail, Output Tax Summary and detail, Box Level Summary, and balances per company code

    Analytics with Queries:

    Analytics allows business users to perform slice and dice and provide data insights. You can create queries with analytical CDS Views and then assign them to legal documents for analytics

    .You can choose one of the following query source types to create queries.

    • CDS Views
    • Class method
    • BRFplus
    • ABAP DDIC
    • BEX Query
    • HANA views

    More details on query source types can be found here.

    Here I have added steps to add a query for the Input tax summary.  Similarly, you can add other queries as well.

    To start creating a new query, follow the steps mentioned below:

    A. In the Query section, choose the Addimg11.jpg

    B.Enter a name for the Query in the Query ID field and choose Continueimg12.jpg

    C. Select the Data Source Type as CDS Viewimg13-1.jpg

    D. select the CDS View in the Data Source Name

    img13-3.jpgimg14.jpg

    You can now see the parameters (if relevant) and filters defined for the data source.

    img15.jpgimg16.jpg

    E.Select the Analytics Indicator. This indicator is used to decide how queries should be created for embedded analytics (analyze data). (Optional). Various options for Analytics Indicator can be found here.

    F. In the Parameters section, you can:

    • Specify the source type and value for a fielimg17-1.jpg
    • If the source type is assigned as a Query Column, you can assign an existing condition to it, or create a new condition in the section Conditions. (Optional)

    G. In the Filters section, you can

      • You can set filter conditions for the list of available fields.img18.jpg
      • Toggle Filter switch for to enter filters values for given field
        img19.jpgimg20.jpg
      • You can set any number of include or exclude conditions to regulate the results of the query.img21.jpgimg23.jpgimg24-1.jpgimg25.jpg
        You can follow the same steps to define filter conditions for other fields.

    H. In the Conditions section, you can define conditions to get unique records from the query dataset (Optional).

    • Choose the plus ‘+’ icon.
    • In the Add Condition dialog box, specify the condition ID.
    • In the right panel, you can define conditions for the data set columns.

    I. In the Sort Order for Rows section, you can select columns that are used for sorting the data set. You can set the sort order as ascending or descending. You can also move the columns up and down.

    J. Save the changes.

    img26.jpgYou can follow the same steps to create queries for output tax summary and BOX Level Summary.

    Note: Query filters are applied while fetching data from the source whereas query conditions are applied after data has been fetched.

  6. Document Definition:

    You can create document definitions for the legal documents that should get generated during the compliance reporting process.
    Creating document definition involves 3 steps

    4.1 Define Document Properties

    You can add a new document either by providing a schema, or a query. You can add new documents in one of the following formats – XML, TXT, ALV, XBRL*(*limited scope), JSON, or PDF

    To add new documents, perform the following steps:

    A. In the Document section, choose the Add pushbuttonimg27-1.jpg

    B. Choose the option Add with Schema/Query, provide Document ID, and select Continueimg28-1.jpgimg29-2.jpg

    C.In the General Properties tab, do the following

    a. Select output format of the document

    IMG30.jpg In this example, we create a document with ALV Format

    img31.jpg

    b. Enter the document description.img32.jpg

    c. Choose the option, Schema or Query.

    In our example report, we will create a new schema from ABAP DDIC structure to define elements and attributes in the document.

    More details on creating schema are explained in section 4.

    d. To set a name for the generated document, select the file name and enter the required value.

    e.Select the Code Page
    img33.jpg

    f. Configure the document as an optional or a mandatory document.

    If you specify a document as optional here, you can choose to remove it from getting generated in the Run Compliance Reports app. By default, the document is mandatory and will get generated in the Run Compliance Reports app.

    g. You can configure your output documents to be viewed in a user-friendly and consistent format by using the Visualization Mode option.In the Visualization Mode field, set the value as follows:

    • Blank: This is the default option that disables the preview in the Run Compliance Reports
    • Read Only: This enables the preview in theRun Compliance Reports app.
    • Editable: This enables the preview in the Run Compliance Reports app and you can edit the field values using this option. You can enable field visibility and manual adjustment using this option.img34.jpg

    4.2 Creating Schema Definition

    We will be providing the details about how to create a schema in another blog.

    4.3 Perform Mapping

    Mapping is the process of assigning data sources to the target elements defined in the schema. You can use sources such as literals, parameters from reporting entity configuration, query column, system fields, or report parameters. The app provides you the flexibility to define your own queries and manage conditions as well.

    To perform mapping, do the following:

    A. Select Mapping tab in document screen

    img35.jpgThe mapping view is pre-populated with the elements and attributes details of the schema.

    B. In the Label field, you can specify labels for elements or attributes. The specified labels appear for the elements or attributes in the preview mode in the Run Compliance Reports app.

    img36.jpg

    C.In the Loop Queryfield, select a loop query if the element is repeatable and should contain different values for each line of a query result dataset.

    img37.jpg

    D.he elements or attributes of elements can be mapped to any of the available datasources

    img38.jpg

    img39.jpg

    img40.jpg

    Similarly, map all elements and attributes with required data sources.

    G. The Manual Adjustment Options column is enabled in Mapping only when the visualization mode is set as Editable. In the Manual Adjustment Options field, choose one of the following options:

    • Read Only: You will not be able to edit the element in the manual adjustment mode.
    • Inherit Document Visualization: The element inherits the visualization mode settings of the document. For example, if the visualization mode setting of the document is read-only, the element will be read-only in the manual adjustment mode.
    • Editable if Data Source or Value is Blank: The element will editable in the manual adjustment mode if the data source is not specified or if the data source provides a blank value.

    In our example, we set manual adjustment with Inherit Document Visualization.img41.jpg

    H. The Field Visibility for Previewcolumn is enabled in Mapping only when the visualization mode is set as Read-Only or Editable. In the Field Visibility for Preview field, choose one of the following options:

    • Show Always: It always displays the element or attribute in the preview.
    • Hide Blank Optional Elements: If an optional element or attribute value is blank, it does not display in the preview.
    • Hide Always: It always hides the element or attribute in the preview.

    img42.jpg

    I. In the Delimiter field, specify a delimiter for your TXT files. You can specify any character, or the following control characters as delimiters: \n for newline, \t for tab, \s for space, and \r for carriage return.

    J. Save the document mapping.

    img43.jpg

  7. Correspondence Definition (Optional)

    Based on the compliance reporting requirements of the country, you may be required to submit tax details to the respective business partners through the business partner correspondence documents. To generate the relevant correspondence documents, you can create the correspondence definitions in the Define Compliance Reports app.

    To create a correspondence document definition, perform the following steps:

    A. In the Correspondence Definition section, choose the Add push button.

    B. In the Correspondence ID field, enter an identifier for the business partner correspondence document.

    C. In the Form Template field, select the template of the PDF form to be shared with business partners. A form template is created based on the format provided by the legal authorities of the country.

    D. In the Query ID field, select a pre-defined query as the data source for the correspondence document.

    E. In the Output Type field, select a pre-defined output type. An output type typically represents a business document of a single application and defines the output parameters for that document. SAP pre-delivers a set of output types for existing applications. Each application object type can have one or more output types assigned to it.

    For example, if you have a sales document as an application object type, possible output types might be a debit memo request, a sales contract, or a customer return.

    F. Choose OK.

    For VAT Reports no correspondence document required to be generated hence we will not create a correspondence definition for our example report.

  8. Event HandlerTo adhere to the compliance reporting requirements, you may need to introduce report-specific checks as part of the report flow, such as validation of selection screen parameters, checks before file generation, and so on.You can subscribe to the pre-defined events and customize the behavior of the report definition.The available events are:0001 Validation of selection screen parameter 0002 Checks during the generation process 0003 Defaulting of the report parameter value 0004 Checks before file generation 0005 The event is called before the generation process is started. 0006 Additional Authorization Check for Compliance Documents 0007 Event for Custom formatter 0008 Set properties for selection screen parameter. 0009 Event is called before execution of the action. 0010 Perform operations after getting a communication response. 0011 Document log modification 0012 Query filter for analytics 0013 Event before element generation 0014 Display text before submission status update 0015 Report Run Log Modification

    In our example, we wanted to have default values of parameters “Include Deferred Tax” and “Include MOSS Tax”.  Hence, we create an implementation class by adding interface IF_SRF_EVENT_REP_PAR_DEF_VAL and subscribe with event 0003.

    A. In the Event Handler Section, choose Add.img45.jpg

    B. Select Event ID as 003, choose Implementation class, and choose OK.img46.jpg

  9. Reported Items Log

    The system keeps track of the documents considered for reporting under a specific reporting task. This tracking helps to analyze and audit these documents if required. The tracking also ensures consistency between the data considered for generation and the data considered for analytics.

    You can specify the table name that stores the documents considered for reporting under a specific reporting task. You also specify the query that is used to retrieve the documents considered for reporting under a specific reporting task.

    A. In the Reported Items Log section, choose Addimg47.jpg

    B. Select Table Name, Query ID, and Choose OKimg48.jpg

  10. Verify Report Definition:

    Chose ‘Verify’ to ensure that the report definition does not contain any error

  11. Activate Report Definition
With this blog post, you have learned how to create a new report definition from scratch. In the subsequent blog posts of this series, we would look at how this report definition can be linked to a report category and subsequently be used for reporting via the Run Compliance Reports application of SAP S/4HANA for advanced compliance reporting.
If you have any questions/queries, you can post them here.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK