Explaining the TRM Specific BRFplus Features

Objectives

After completing this lesson, you will be able to:
  • Utilize BRFplus Manager to create BRFplus objects for TRM
  • Explain the standard TRM actions available in BRFPlus
  • Understand the configuration of BRFplus integration in TRM

BRFplus Manager

There are TRM specific tools and configuration for BRFplus. Detail can be refers to IMG path: Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → BRFplus.

Form Bundle

Note

You use the BRFplus Integration Manager for Form Bundle to make data of a form bundle available for processing in the BRFplus rules engine. After you have generated the objects, the system makes them available in the BRFplus Workbench.

Within the BRFplus workbench, you have the capability to create BRFplus applications, functions, and other objects. For efficient management, TRM offers the BRFplus Manager tool, simplifying the creation and updates of BRFplus applications, functions, and data objects for TRM application. Certain BRFplus objects, like data objects linked to Internal Service Request (ISR) scenarios, must be generated using this tool to enable the use of TRM Action Table Forms.

To access BRFPlus Manager, follow the IMG path: Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → BRFplus → Define BRFplus Objects for Form Bundles. Alternatively, you can directly call transaction code BRFPLUS_MANAGER.

The creation of BRFplus objects via BRFplus Manager involves the following steps:

  1. BRFplus Application Creation: Start by creating a BRFplus application. Depending on the ISR scenario associated with a form bundle you intend to process using the BRFplus rules engine, you'll create Data Objects, Functions, or Expressions.
  2. Data Object Creation: If you need ISR scenario data or SAP data objects from the form bundle to be accessible in BRFplus, select the Data Object option.
  3. To create a data object for ISR scenario data, click the ISR Scenario push button. If your system permits filing multiple forms of the same type, consider the Table Data Object option. This is useful, for instance, if a business partner rents multiple apartments and files separate tax forms for each. For a comprehensive list of available fields in the ISR scenario, use the Object List push button.

    To create a data object for data dictionary objects available for the form bundle, choose the SAP Data Object pushbutton. To enable the processing of form bundles within the BRFplus rules engine, define a processing rule in the form bundle type configuration. In this step, assign the BRFplus application and BRFplus function that you've created in the current configuration activity. SAP delivers the following SAP Data Objects:

    • INTERACTION: A prerequisite for the business partner duplicate action, used in conjunction with the Tax Officer Work Center (also known as the Tax Officer Cockpit).
    • FPF_HISTORY: Necessary if you want to make transaction history data available in BRFplus.
    • FPF_MEMBER: Stores the relationship between contract objects, contract accounts, business partners, and tax returns. Useful for consolidated registration or joint filing.
    • FORM_HEADER
  4. BRFplus Function Creation: To create a BRFplus function, choose the Function push button. When creating a function, the system will automatically assign the following objects to the function signature in the BRFplus workbench: SYS_FORM_BUNDLE_HEADER, SYS_CONTROL, SYS_MESSAGE.

When specifying amount fields in the ISR scenario configuration, the system must determine a currency for populating the currency field. In the default implementation, the system uses event P361 to derive the currency, which is returned as US Dollars.

Object-Based Tax

To access BRFPlus Manager for Object-Based Tax, navigate through the IMG path: Financial Accounting -> Contract Accounts Receivable and Payable -> Business Transactions -> Public Sector Tax Assessment -> BRFplus -> Define BRFplus Objects for Object-based Tax. Alternatively, you can directly call transaction code BRFPLUS_MANAGER_OBT.

This program serves as a tool for generating applications and functions within the BRFplus rules engine. These applications and functions are essential for defining business rules pertaining to tax object billing. Once you've generated the necessary BRFplus objects, you'll proceed to implement the corresponding rules directly within the BRFplus workbench.

For contract objects, facts are conveyed to the context parameter FACTS_T within the generated BRFplus function. Additionally, you have the option to choose specific facts types and fact categories associated with a particular contract object type to optimize their transfer to the BRFplus function. This transformation can be customized to include only the relevant fact types and categories aligned with your business rules. The transformed facts are then delivered to the context parameter FACTS_TRANS_T in the generated function.

BRFplus offers a range of predefined expression types, including decision tables, search trees, and formulas. In addition to these, SAP provides action types tailored for Tax and Revenue Management to automate tasks like tax return validation and calculation. Moreover, you have the flexibility to create your own action or expression types, expanding BRFplus functionality with features not covered by SAP's delivered action types. This customization is carried out within the BRFplus workbench, where all action types, including those created by SAP and your own, are conveniently accessible via the context menu.

The design principles pertaining to TRM actions can be summarized as follows:

  1. Focus on Flexibility and Extensibility:
    • You have the ability to define the execution sequence of actions using the BRFplus Workbench, with actions executing during BRFplus runtime.
    • It's possible to include actions that rely on custom coding for added flexibility.
    • Ensure that all available fields in the objects' methods are accessible.
  2. Focus on Usability:
    • Fields and parameters can be tailored to user needs, with options to hide them through configuration and switch between simple and expert modes.
    • Renaming fields and adjusting their sequence is supported.
    • Fields and parameters can be designated as mandatory.
    • Support for individual table line assignments is provided, particularly useful for table parameters.
  3. Strive for a Business Object Orientation:
    • Actions are designed to cater to both updates and creations for each business object.
    • Many actions require multiple exporting parameters to fulfill their purpose, simplifying complex processes.
    • Some actions, although eligible to become expressions, are designed as actions to maintain simplicity.
  4. Enable Lean Trace:

    Incorporate Lean Trace into your design. It allows logging of rules executed in BRFplus for each individual form bundle, minimizing performance impact.

You can change the TRM action delivered by SAP, you have the flexibility to make changes in three key areas: general settings, parameter settings, and field settings.

  1. General Static Method Settings:

    To associate custom documentation with an SAP-delivered expression type, you need to override the documentation object's name provided by SAP. This can be accomplished within the Static Method Settings folder.

  2. Parameter Settings:
    • Visibility: You can modify visibility settings for parameters within the method. For instance, you can change a field from being invisible to being visible in both simple and expert modes. It's important to note that the BRFplus workbench offers two distinct UI modes: "Simple mode" for business users and "Expert mode" for business experts or developers.
    • Mandatory: When a parameter is designated as mandatory, the system will raise an error if the user fails to assign a value while configuring an action or expression in the BRFplus workbench. This prevents activation until all mandatory parameters are defined.
    • Show and Show with Details: These options control how parameters are displayed in the BRFplus workbench. If neither option is selected, the user can edit this parameter after clicking the "Add Parameter" button.
    • Description: To display alternative text instead of the description from the DDIC data element, structure, or table linked to the parameter, you can input your custom description.
  3. Field Settings:

    Field settings apply solely to structure or table parameters and are not relevant for parameters linked to data elements. This is because, for single-field parameters, the parameter settings match the field settings. Additionally, field settings customization is available exclusively for importing parameters.

To define new TRM actions or update existing ones, follow the IMG path: Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → BRFplus → Define Parameters for Static Methods of BRFplus.

Creating your expression types involves the following steps:

  1. Generate a class and method (using transaction code SE24) that inherits from class CL_FMCA_BRFP_FPF_PROCESS.
  2. In the BRFplus workbench, create a new action or expression type. For new action types, check the Action Type checkbox and specify class CL_FMCA_ACTN_STATIC_METHOD, interface IF_FDT_ACTN_STATIC_METHOD, and UI class CL_FMCA_STATIC_METHOD_UI. For new expression types, follow the same process without selecting the Action Type checkbox, and specify class CL_FMCA_STATIC_METHOD, interface F_FDT_STATIC_METHOD, and UI class CL_FMCA_STATIC_METHOD_UI.
  3. Associate your method and class with your expression or action type in the Assign Default Method to Expression/Action Type.
  4. Optionally, define parameters for your BRFplus Static Methods. General settings, parameter settings, and field settings can be customized in the current Customizing activity. These settings will be visible in the BRFplus workbench when users maintain the respective action type.
  5. Optionally, assign documentation to your action or expression type by creating a general text and linking it to the method. This documentation can be accessed in the BRFplus workbench under the General area by selecting "Show More" and then choosing the Documentation tab.
  6. The system automatically establishes default values for the method parameters.

Standard TRM Actions

Common Feature

Duplicate Prevention Key

  • Actions responsible for creating new objects offer an optional field known as the "Duplicate Prevention Key."
  • When you provide this key, it ensures that, in the event of form bundle reprocessing, objects that have already been created are not re-created.

Business Logic Centralization

All business logic is centralized within the class CL_FMCA_BRFP_FPF_PROCESS.

Message and Error Handling

For actions involving the creation or update of objects, two key parameters are involved:

  • ET_MESSAGE: These actions return a message table containing detailed information in the event of errors.
  • EX_ERROR: These actions also return an error indicator parameter to signify whether any errors occurred during execution.

List of TRM Action

The following table is showing the actions available for Tax and Revenue Management.

List of TRM Action

ActionWhat can I do with it?
TRM Add MessageYou use this action, if you want the system to raise a message when processing a form bundle.
TRM Create Business PartnerYou can use this action to create new business partners.
TRM Create Contract AccountYou use this action to create a new contract account and assign it to a business partner.
TRM Create Contract ObjectYou can use this action to create a new contract object with or without accounting data.
TRM Create Contract Object RelationshipYou use this action to create contract object relationships.
TRM Create Filing ObligationYou use this action to create a filing obligation rule.
TRM Create Inbound CorrespondenceYou can use this action to generate inbound correspondence requests.
TRM Create LetterYou use this action to create a letter such as a confirmation or turnaround letter.
TRM Create Revenue Distribution KeyYou use this action to define information that is relevant for the revenue distribution process.
TRM Create Billing DocumentYou use this action to create billing documents and its related documents (invoicing document and FI-CA posting document) when processing a form bundle.
TRM Create Tax ObligationYou use this action to register a tax obligation.
TRM Read Business Partner DetailsYou use this action to search for detailed information of a specified business partner.
TRM Read Interest CalculationYou use this action to calculate interest for overdue tax payments.
TRM Read Overdue PaymentsYou use this action to search overdue open balances for a business partner in a given period.
TRM Read Business Partner DuplicatesYou use this action to identify business partners already stored in the system that match the specified criteria.
TRM Read Contract Account DocumentsYou use this action to search open items of contract account that meet the selection criteria you specified.
TRM Read Contract AccountsYou use this action to search for contract accounts that meet the selection criteria you specified.
TRM Read Contract ObjectsYou use this action to read contract objects.
TRM Read Contract Object RelationshipsYou use this action to search for contract object relationships that meet the specified selection criteria.
TRM Update Tax ObligationYou can use this action to update an existing tax obligation.
TRM Update Business PartnerYou can use this action to update an existing business partner.
TRM Update Contract ObjectYou use this action to change an existing contract object, which is identified by the contract object key (input parameter IV_PSOBKEY).
TRM Update Filing ObligationYou use this action to update filing obligation rules.
TRM Update Form BundleYou use this action to update form bundle data such as, for example, the form bundle header, form data, or status.
TRM Update Inbound CorrespondenceYou use this action to update inbound correspondence requests.
TRM Update UME UserYou use this action to activate a user management engine (UME) user in the Taxpayer Online Services (TPOS) system.

Hint

  • Use the EX_ERROR variable of an TRM create/update action to determine whether a subsequent rule should be executed
  • After a successful execution of the billing action in a tax return, set the form bundle status to Processed by using the Form Bundle Update action.
  • After a successful execution of business objects (for example business partner, contract account) in a tax registration, set the form bundle status to Processed – by using the Form Bundle Update action.

Business Partner

Creation of Business Partner

Creating Business Partners

You can utilize the TRM Create Business Partner action to generate new business partners. This action offers a range of parameters that enable the automatic creation of business partner details like addresses or bank information. The action invokes the CREATE_BUSINESSPARTNER method of the CL_FMCA_BRFP_FPF_PROCESS class, building the new business partner in line with your specifications.

Some notable parameters include:

  • IT_ADDRESS: To create multiple addresses for a single business partner.
  • IT_ADDRESSUSAGE: To specify address usage, using the same external address number in IT_ADDRESS and IT_ADDRESSUSAGE (technical names: ADEXT_ADDR and ADEXT_ADVW).
  • IV_HANDLINGKEY: To prevent duplicate object creation when rerunning a process.

The action provides a unique key for the newly created business partner in the EV_PARTNER export parameter.

Retrieving Business Partner Details

To search for detailed information about a specified business partner, you can use the TRM Get Business Partner Details action. This action invokes the GET_BUSINESSPARTNER_DETAIL method of the CL_FMCA_BRFP_FPF_PROCESS class.

Key parameters include

  • IV_PARTNER: To specify the business partner number.
  • IS_CONTROL: To customize the type of data you wish to retrieve, such as e-mail or bank information. For instance, if you need the complete e-mail address of the specified business partner, set XEMAIL_MULT in the IS_CONTROL input parameter to "X." The action will then place the full e-mail address in the ET_EMAIL export parameter.
  • ES_BUT000: To obtain generic business partner data, including the default address.

If the action cannot locate the specified business partner, it returns the value "X" in the EV_BP_NO_FOUND export parameter.

Updating of Business Partner

You can use the "TRM Update Business Partner" action to modify an existing business partner. This action invokes the UPDATE_BUSINESSPARTNER method within the CL_FMCA_BRFP_FPF_PROCESS class and allows you to update a business partner according to your specific requirements.

Several important considerations apply to the following parameters:

  • Ensure the entry of a valid business partner ID, accomplished through the input parameter IV_GPART.
  • To modify the generic data of a business partner, utilize the IS_BUT000 parameter.
  • Depending on your needs, you have two options for updating the input structure IS_BUT000:
    • To alter specific fields exclusively, assign individual data for each desired field to a corresponding field in an input structure. The system updates solely the assigned fields, leaving the unassigned fields unchanged. This approach utilizes the hidden parameter IS_BUT000_X. For each field assigned to the input structure, the system populates IS_BUT000_X with an "X" to indicate updates. All fields with an "X" value in IS_BUT000_X bearing the same name in IS_BUT000 undergo modification.
    • To change the values of all fields belonging to a structure, assign the relevant data object structure to the input structure. The system will update all fields within the selected structure. Empty fields in the new data object structure overwrite existing values.
  • For making alterations to multiple addresses related to one business partner, use the IT_ADDRESS parameter.
  • To modify the address usage you've created, use the IT_ADDRESSUSAGE parameter. To specify address usage, utilize the same external address number with the technical name ADEXT_ADDR in both IT_ADDRESS and IT_ADDRESSUSAGE parameters. In both structures, employ the change category to indicate the type of change you wish to execute. The category for IT_ADDRESS is CHIND_ADR, and for IT_ADDRESSUSAGE, it is CHIND_ADVW. The letter "I" typically represents insertion and is commonly used for data creation. Both CHIND_ADR and IT_ADDRESS offer various change categories used to control portions of the address. For instance, "CHIND_TEL" manages telephone-related fields, and CHIND_FAX controls fax-related address components. For example, to insert an address with telephone information, set CHIND_ADR to "I," and populate the address-related fields. Set CHIND_TEL to "I" to complete the telephone-related information. To update an existing address by adding telephone information, set CHIND_ADR to "U," fill the valid address number field using "ADINT_ADDR" parameter, set "CHIND_TEL" to "I," and input the telephone-related details. The letter "U" in CHIND_ADR signifies an update.

Duplication of Business Partner

You can use the action TRM Get Business Partner Duplicates to identify business partners already stored in the system that match the specified criteria.

Contract

Creation of Contract Account

You can use the TRM Create Contract Account action to generate a fresh contract account and link it to a business partner. This action invokes the CREATE_CONTRACTACCOUNT method within the CL_FMCA_BRFP_FPF_PROCESS class.

Several noteworthy features apply to specific parameters:

  • To establish a contract account, utilize the input parameters IS_FKKVK for creating contract account header data and IS_FKKVKP for generating partner-specific contract account data.
  • Ensure that the business partner, identified by its technical name GPART in IS_FKKVKP, already exists.
  • SAP provides a feature for utilizing sample values during contract account creation. To enable this, define the sample values within the configuration for Financial Accounting → Contract Accounts Receivable and Payable → Basic Functions → Contract Account → Number Ranges and Contract Account Categories → Define Sample for Contract Account Categories. Additionally, indicate "X" in the IX_SAMPLE parameter of this action to load default values set in the configuration.
  • To establish recipient information for correspondence related to the contract account, utilize the IT_CORR parameter.
  • The action furnishes a unique key for the newly created contract account in the export parameter EV_VKONT.

For more detailed information, consult the documentation for the following BAPIs:

  • BAPI_CTRACCOUNT_EASYCREATE
  • BAPI_CTRACCONTRACTACCOUNT_CR1

Using TRM Create Contract Object Action:

The "TRM Create Contract Object" action allows you to create a new contract object, whether with or without accounting data. Notable features for specific parameters include:

  • To include customer-specific data stored in customer includes "CI_PSOB" and "CI_PSOB2," you can utilize the "IS_DETAIL" parameter with the technical name.
  • If utilizing the facts feature, you can assign facts during the creation of new contract objects using the "IT_FACTS" parameter.
  • For storing filing rules alongside the creation of the contract object, the "IT_RL" parameter is available.
  • SAP provides a feature for utilizing sample values when creating contract objects. To enable this, define the sample values within the configuration. You can access this configuration by navigating to "Define Sample for Contract Object Types" within "Contract Accounts Receivable and Payable->Basic Functions" -> Contract Object-> Number Ranges and Contract Object Types -> Define Sample for Contract Object Types. For additional information, refer to the configuration documentation. You can indicate the use of default values set in the configuration by entering "X" in the "IX_SAMPLE" parameter of this action.
  • To prevent the creation of duplicate contract objects, even if the process is rerun, utilize the duplicate prevention key with the "IV_HANDLINGKEY" parameter. For further details, consult the respective field help.

For comprehensive information, refer to the documentation for the following BAPIs:

  • BAPI_CTRACPSOBJECT_EASYCREATE
  • BAPI_CTRACPSOBJECT_CREATE

Using TRM Get Contract Object Details Action:

The "TRM Get Contract Object Details" action serves to retrieve contract objects. For example, if a license number fact category is associated with the car contract object type, you can employ this action to retrieve the contract object with a specified license number, such as "ABC123." Key features of the following parameters are as follows:

  • If the identification key (IV_PSOBKEY) lacks a value, this action initially determines the identification key. During this determination, the action considers the business partner (IV_GPART) and contract object type (IV_PSOBTYP), along with all fact categories (IT_FACTS) assigned to contract object types. Internally, the system utilizes function module "FMCA_EVENT_P591," called at event P591. Should event P591 raise an exception, the action sets the export parameter "EX_ERROR" to "X" and provides no further output.
  • To analyze the input data, the system employs function module "FMCA_EVENT_P591," called at event P591. If event P591 raises an exception, the action sets the export parameter "EV_ERROR" to "X" and returns no additional information.
  • If the identification key for the contract object is known, either because it is provided in the input parameter "IV_PSOBKEY" or determined through event P591, the action retrieves detailed information on the contract object. This information is then written into related output structures and tables. The central contract object information is stored in structure "ES_DPSOB," while structure "ES_DPSOB_BP_ACC" holds data for each partner and contract account category. The tables store distinct aspects of contract object information. For instance, "ET_DPSOB_BP_AC_CORR" contains entries for contract object correspondence recipients, while "ET_DPSOB_BP_AC_EX" contains contract object exception periods, and so on.
  • To obtain an overview of the messages generated during the processing of this action, analyze the export parameter "ET_MESSAGE."

Creation of Contract Object and Getting Contract Object Details

Using TRM Create Contract Object Action

The TRM Create Contract Object action allows you to create a new contract object, whether with or without accounting data. Notable features for specific parameters include:

  • To include customer-specific data stored in customer includes CI_PSOB and CI_PSOB2, you can utilize the IS_DETAIL parameter with the technical name.
  • If utilizing the facts feature, you can assign facts during the creation of new contract objects using the IT_FACTS parameter.
  • For storing filing rules alongside the creation of the contract object, the IT_RL parameter is available.
  • SAP provides a feature for utilizing sample values when creating contract objects. To enable this, define the sample values within the configuration. You can access this configuration by navigating to Define Sample for Contract Object Types within Contract Accounts Receivable and Payable → Basic Functions → Contract Object → Number Ranges and Contract Object Types → Define Sample for Contract Object Types. For additional information, refer to the configuration documentation. You can indicate the use of default values set in the configuration by entering "X" in the IX_SAMPLE parameter of this action.
  • To prevent the creation of duplicate contract objects, even if the process is rerun, utilize the duplicate prevention key with the IV_HANDLINGKEY parameter. For further details, consult the respective field help.

For comprehensive information, refer to the documentation for the following BAPIs:

  • BAPI_CTRACPSOBJECT_EASYCREATE
  • BAPI_CTRACPSOBJECT_CREATE

Using TRM Get Contract Object Details Action

The TRM Get Contract Object Details action serves to retrieve contract objects. For example, if a license number fact category is associated with the car contract object type, you can employ this action to retrieve the contract object with a specified license number, such as ABC123.

Key features of the following parameters are as follows:

  • If the identification key (IV_PSOBKEY) lacks a value, this action initially determines the identification key. During this determination, the action considers the business partner (IV_GPART) and contract object type (IV_PSOBTYP), along with all fact categories (IT_FACTS) assigned to contract object types. Internally, the system utilizes function module FMCA_EVENT_P591, called at event P591. Should event P591 raise an exception, the action sets the export parameter EX_ERROR to "X" and provides no further output.
  • To analyze the input data, the system employs function module FMCA_EVENT_P591, called at event P591. If event P591 raises an exception, the action sets the export parameter EV_ERROR to "X" and returns no additional information.
  • If the identification key for the contract object is known, either because it is provided in the input parameter IV_PSOBKEY or determined through event P591, the action retrieves detailed information on the contract object. This information is then written into related output structures and tables. The central contract object information is stored in structure ES_DPSOB, while the structure ES_DPSOB_BP_ACC holds data for each partner and contract account category. The tables store distinct aspects of contract object information. For instance, ET_DPSOB_BP_AC_CORR contains entries for contract object correspondence recipients, while ET_DPSOB_BP_AC_EX contains contract object exception periods, and so on.
  • To obtain an overview of the messages generated during the processing of this action, analyze the export parameter ET_MESSAGE.

Creation of Contract Object Relationship

The TRM Create Contract Object Relationships action empowers you to establish contract object relationships. For more comprehensive details on master data relationships, refer to IPS510 Training.

This action invokes the CREATE_COREL method within the CL_FMCA_BRFP_FPF_PROCESS class. Key features to note for specific parameters include:

  • The IT_FMCA_COREL input parameter contains the information used by the action to create relationships.
  • In cases where the action cannot create a relationship, it returns the value "X" in the export parameter EX_ERROR.
  • To access all messages generated during the action's processing, utilize the ET_MESSAGE parameter.
  • To prevent the creation of duplicate relationships, even if the process is executed again, consider employing the duplicate prevention key with the IV_HANDLINGKEY parameter.

For verification of these relationships, you can utilize the BRFplus Action BRFPLUS_GET_CO_REL. This action facilitates the search for contract object relationships meeting specified selection criteria. The action records the discovered relationships in a table, accessible through the exporting parameter ET_FMCA_COREL.

Updating Contract Object

The TRM Update Contract Object action allows you to make changes to an existing contract object, identified by the contract object key specified in the input parameter IV_PSOBKEY.

There is special update logic for input parameters IS_DETAIL, IS_ADDRESS, and IS_ACCOUNTING. Depending on your requirements, you have the following options to update these input structures:

  • To modify specific fields only, assign individual data objects to corresponding fields within the input structure. The system will exclusively update the assigned fields, leaving unassigned fields unchanged. This approach involves the hidden parametersIS_ADDRESS_X and IS_ACCOUNTING_X. For each field assigned to the input structure, the system marks an "X" in the control structure IS_ADDRESS_X or IS_ACCOUNTING_X. All fields marked with an "X" in IS_ADDRESS_X or IS_ACCOUNTING_X that share the same name in IS_ADDRESS or IS_ACCOUNTING will be updated.
  • To alter the values of all fields within a structure, follow these steps: Assign the relevant data object structure to the input structure. In this scenario, the system updates all fields within the selected structure. In other words, fields left empty in the new data object structure will overwrite any existing values.

For additional information on the available parameters, consult the documentation for the Create Contract Object action, as it shares some parameters with the current action.

Tax Obligation

Creating and Updating Tax Obligation

You can use the TRM Create Tax Obligation action to register a tax obligation. Technically, this tax obligation is represented by a fact value of fact type RG01, which is assigned to a contract object. Here are the key considerations:

  • You must specify a start period for the tax obligation. If the end period is left blank, the tax obligation concludes at the end of the period chain initiated by the provided start period. These period chains are configured in Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Billing → Define Details for Tax Periods.
  • Alternatively, instead of specifying a start period, you can provide a start date, periodicity, and an optional end date. The system derives the start period from the combination of the start date and periodicity, and the end period from the combination of the end date and periodicity.
  • Input parameter IS_TOBL_CORE is used for entering core fields. It's essential that the business partner, contract account, and contract object are pre-existing objects.
  • A revenue type is mandatory as it governs the revenue collection process. You can configure revenue types in Contract Accounts Receivable and Payable under Basic Functions → Define Revenue Type.
  • Provide information related to online filing if necessary. This field may contain mandatory details required by tax authorities for online filing of this tax obligation. Check domain EFILE_PS for available values.
  • To prevent the creation of duplicate tax obligations, even if the process is executed again, utilize the duplicate prevention key with parameter IV_HANDLINGKEY.

The TRM Update Tax Obligation action serves the following purposes:

  • Modify online filing information.
  • Adjust periodicity information.
  • Deregister a tax obligation.

Similar to the creation action, this tax obligation is technically represented by a fact value of fact type RG01 assigned to a contract object. To update online filing information, use the input parameter IS_EFILE.

To deregister a tax obligation, specify the end period for the tax obligation. The program will remove the assignment of contract objects to the fact value with fact type for all periods following the provided end period. For further details on the period definition, refer to the configuration for Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Billing → Define Details for Tax Periods.

Additionally, you must specify a revenue type. Leaving the revenue type blank will result in the program deregistering all tax obligations created for other revenue types as well.

Letter

Creation of Letter

You can utilize the TRM Create Letter action to generate either a confirmation letter or a turnaround letter. A turnaround letter is automatically dispatched by the system in response to an incoming document that is either incomplete or incorrect. The correspondence type designated for turnaround letters is "P730."

To prevent the inadvertent creation of duplicate letters, even in the event of process re-execution, you can employ the duplicate prevention key with the parameter IV_HANDLINGKEY.

In terms of configuration, take the following settings into account:

  • In the configuration forFinancial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Form Processing, you should have defined a correspondence type for confirmation letters.
  • You can specify one of several application forms that have been associated with this correspondence type. The assignment of application forms to a correspondence type can be configured in Financial Accounting → Contract Accounts Receivable and Payable → Basic Functions → Correspondence → Define Application Forms for Correspondence.

Billing Document

Creation of Billing Document

You can use the TRM Create Billing Document action to generate billing documents along with their associated invoicing and PSCD posting documents when processing a form bundle. This action invokes the CREATE_SINGLE_BILLING_DOCUMENT method within the CL_FMCA_BRFP_FPF_PROCESS class to facilitate billing document creation for a form bundle.

Several noteworthy features pertain to the following parameters:

  • Importing Parameters:
    • To supply document header information derived from table DFKKINVBILL_H, utilize the IS_FKKINVBILL_H parameter.
    • To provide billing document item details derived from table DFKKINVBILL_I, make use of the IT_FKKINVBILL_I parameter.
    • For additional information related to billing document items, drawn from table DFKKINVBILL_A, employ the IT_FKKINVBILL_A parameter.
    • If your intention is to preserve the existing form bundles and old billing documents without alteration, set the IB_NEW_ONLY parameter to "X." In such a case, the action generates new billing documents based on the provided input, without considering the old billing documents and postings associated with this form bundle.
    • Conversely, if you wish to modify or reverse existing postings, set the IB_NEW_ONLY parameter to false.
  • Exporting Parameters:
    • To obtain an overview of messages issued during the execution of this action, refer to the export parameter ET_MESSAGE.
    • If the export parameter EV_ERROR is set to true, it indicates that an error occurred during the execution of this action.

Creation of Object-Based Billing Document

This action enables the creation of billing documents specifically designed for object-based billing. It invokes the CREATE_BILLING_DOCUMENT method within the CL_FMCA_BRFP_FPF_PROCESS class to facilitate the creation of billing documents. You must provide the necessary information for both the billing document header and billing document line items.

Filling Obligation

Creation of Filling Obligation

This action TRM Create Filing Obligation serves the purpose of creating a filing obligation rule, defining the parameters for the system's automated generation of filing obligations. In the system, filing obligations are represented as inbound correspondence requests, and this action sets the rules for the periodic generation of these requests.

To make use of this functionality, it is essential to activate enhanced correspondence in the Contract Accounts Receivable and Payable configuration. In the standard delivery, enhanced inbound correspondence is already activated. For detailed instructions, refer to the configuration forFinancial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Inbound Correspondence → Inbound Correspondence (Enhanced) → Activate Enhanced Inbound Correspondence.

This action calls the CREATE_FILING_OBLIGATION method within the CL_FMCA_BRFP_FPF_PROCESS class.

Here are some noteworthy features for the parameters:

  • You can specify either an end date or an end period for a filing obligation using input parameter IV_END_PERIOD.
  • Input parameters IV_GPART (Business Partner), IV_VKONT (Contract Account), and IV_VTREF (Contract Object) are accepted, but these parameters must refer to existing objects.
  • The status of the filing obligation rule determines whether an inbound correspondence can be generated for the associated contract object. Input parameter IV_FILSTAT is used to define this status. Different status messages are available in the value help and are configurable in the Contract Accounts Receivable and Payable settings. For detailed instructions, navigate to Business Transactions → Inbound Correspondence → Inbound Correspondence (Enhanced) → Define Status for Generating Inbound Correspondence.
  • To prevent the creation of duplicate filing obligations, even if the process is run multiple times, the duplicate prevention key can be employed with parameter IV_HANDLINGKEY.

Inbound Correspondence Request

Creation of Inbound Correspondence Request

The TRM Create Inbound Correspondence action serves the dual purpose of generating inbound correspondence requests and validating whether the required documents have been submitted by the business partner within the stipulated deadline. If necessary, it can initiate collection actions.

This action empowers you with advanced functionalities for generating inbound correspondence requests. To utilize these features, it's imperative that enhanced inbound correspondence is activated within the Contract Accounts Receivable and Payable configuration. In the standard configuration, enhanced inbound correspondence is already enabled.

The program generates inbound correspondence requests based on the parameters you define within this action. Here are some notable aspects of the parameters:

  • To maintain the integrity of your data and prevent the creation of duplicate inbound correspondence requests, even in the event of multiple process runs, you can employ the duplicate prevention key using parameter IV_HANDLINGKEY.
  • When specifying a due date, the value you assign takes precedence over any system-defined date. If no parameter is specified, it's crucial to ensure that a due date is appropriately configured in the system.
  • Similarly, when providing values for amount and currency parameters, these values override any defaults set during the creation of inbound correspondence requests via event P101. If event P101 doesn't derive an amount and currency, these parameters must be explicitly defined. Importantly, the amount parameter should not be set to zero.

Updating Inbound Correspondence Request

The TRM Update Inbound Correspondence Requests action is designed for the purpose of updating inbound correspondence requests. To fully leverage this functionality, it is essential to have enhanced correspondence activated on configuration. In the standard configuration, this enhancement is readily activated.

Behind the scenes, this action invokes the method UPDATE_INCORR within the CL_FMCA_BRFP_FPF_PROCESS class. Notably, there are several special considerations for its parameters:

  • An inbound correspondence request is automatically marked as cleared when a taxpayer has successfully submitted the required form and fulfilled their filing obligation. In such cases, the parameter INCORR_DATE contains the corresponding clearance date. It's worth noting that INCORR_DATE can be automatically derived, often via a period key, negating the need for manual input. If INCORR_DATE remains empty, the system populates it with the current system date.
  • To enable the system to calculate the due date for an inbound correspondence request automatically, you should input a relevant period key using the IV_PERSL parameter.
  • When dealing with multiple filing obligations within a single period, the lower limit of the billing period may vary from what the system derives from the specified period key. To address this, you can explicitly specify the lower limit of the billing period using the IV_ABRZU parameter. For comprehensive information on period keys, refer to the configuration settings within Contract Accounts Receivable and Payable, particularly under Business Transactions → Public Sector Tax Assessment → Billing → Define Details for Tax Periods.
  • If you wish for the system to create a new inbound correspondence request in cases where it cannot identify the request to be cleared, you can activate this behavior by adjusting the parameter IX_CREATE accordingly.

Form

Form Rule

The TRM Form Rules action empowers you to establish rules for each field within a form, allowing the BRFplus rules engine to seamlessly process them.

For each field that requires a rule definition, create corresponding data objects within the relevant scenario and version in IMG configuration Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → BRFplus → Define BRFplus Objects for Form Bundles.

Here are some key features to consider when working with the parameters:

  • Multiple Rules per Field: You have the flexibility to assign multiple rules to a single form field.
  • Action or Expression Assignment: For advanced functionality, assign either an action or an expression to a rule. If an expression is defined, the BRFplus rules engine will execute it at runtime, updating the form field with the computed value or comparing it with other assigned expressions.
  • Check Rules: Define check rules for specific fields to enable the BRFplus rules engine to perform validation checks. In case of errors, the engine populates the context table with relevant error messages.
  • Custom Messages: Tailor messages that the BRFplus rules engine generates when executing rules, enhancing the clarity and specificity of feedback.

To establish rules for form fields efficiently, follow these five steps:

  1. Launch the BRFplus workbench.
  2. Select the BRFplus application relevant to your rule creation.
  3. Choose the appropriate scenario.
  4. Add the required field(s) using the Add function within the Selected Fields section.
  5. To define a new rule for a field, click Add in the Rules for Field table. For each rule, you can specify include conditions, exclude conditions, assign expressions, assign actions, or trigger messages. All these functions are readily accessible via the push buttons within the Rules for Field table. Notably, when opting to raise a message, you can define multiple messages within a message table, ensuring comprehensive rule-driven messaging.

Updating Form Bundle

The TRM Update Form Bundle action facilitates the modification of form bundle data, encompassing the form bundle header, form data, or status. This action invokes the method UPDATE_FORM_BUNDLE within the class CL_FMCA_BRFP_FPF_PROCESS.

Key considerations for the action parameters:

  • Form Bundle Header Updates: The form bundle header data is stored in the BRFplus data object SYS_FORM_BUNDLE_HEADER. To update the form bundle header, ensure that the input parameter IX_RETURN_HEADER contains the value X.
  • Form Data Updates: When you intend to update the form data, employ the input parameter IX_FORM_DATA with a value of X. In this scenario, the form bundle header data is invariably updated as well. It's worth noting that the form bundle header data is updated regardless of IX_RETURN_HEADER containing the value X or not.
  • Handling Messages: Messages generated during form bundle processing are stored in the BRFplus data object SYS_MESSAGE. To trigger an update of the form bundle header when messages are present, utilize the input parameter IX_BRF_MSG with the value X.
  • Joint or Consolidated Filing: Information pertaining to joint or consolidated filing resides in the BRFplus data object FPF_MEMBER. To update member information for form bundles and facilitate duplicate checks within a bundle, activate the input parameter IX_FB_MEMBER with the value X. This feature proves invaluable when handling multiple members belonging to a single form bundle. For more information, see the documentation of event P333.
  • Workflow Integration: To initiate workflows, employ the input parameters IV_WF_REASON OR IV_WF_TASK. IV_WF_REASON holds the workflow reason, as configured, and is critical for initiating workflow tasks. Refer to the configuration documentation under Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Form Processing → Define Reason for Triggering Workflow Task for more details. The action seamlessly transfers values from these parameters to event P150, further enhancing workflow functionality.
  • Status Information Update: To modify status information, utilize the parameter IT_STATUS_CHANGE. Table FMCA_POBJ_STATUS_EX is linked to IT_STATUS_CHANGE and is internally organized by return ID (with the technical field name OBJECT_ID) and business transaction (with the technical field name TRANSACTION).
  • System Status Management: To set system statuses, employ the TRANSACTION input parameter. Refer to transaction code BS13, specify object type P01 for PSCD Form-based Processing, and navigate to Go to → Allowed Business Transactions. Identify the relevant transaction (for example P012 Bill), and set the corresponding status, such as Processed IP014 or To be Approved IP021, based on the transaction and the form bundle's active status in the system.
  • User Status Configuration: To configure user statuses, omit the TRANSACTION parameter and assign values to the user status field with the technical field name STATUS_ID. For managing multiple user statuses, insert multiple lines with the same return ID and leave the TRANSACTION input parameter empty, streamlining the user status update process.

Accounting Documents

Getting Accounting Documents

You can utilize the TRM Get Accounting Documents action to efficiently search for open items within contract accounts based on your specified criteria.

Action Details

This action invokes the SEARCH_CA_DOCUMENTS method within the CL_FMCA_BRFP_FPF_PROCESS class.

Key Features

  • It retrieves open items and stores them in the ET_FKKOP parameter table.
  • The calculated amounts for the open items are conveniently written into the EV_AMOUNT parameter.

Note

Important: Be aware that this action is unable to fetch period keys when parameters IV_PERSL_BGN and IV_PERSL_END have different periodicities. For example, if your search spans from the period key 2009 to 2010, it won't return documents with varying periodicities like monthly (for example October 2001, October 2002, October 2003) or quarterly (for example Quarter One 2010, Quarter Two 2010, Quarter Three 2010).

This action streamlines the retrieval of open items, ensuring a precise and efficient process aligned with your selection criteria.

Distribute Revenue

The TRM Distribute Revenues action serves to define crucial information for the revenue distribution process, particularly related to the allocation of receivable items to final recipients. This data is structured within the DFKKRDI_RATE distribution information table, and it plays a significant role in enhancing the revenue distribution process.

This action not only facilitates the setup of final recipients and their corresponding distribution shares but also retrieves the essential revenue distribution key required for the Create Billing Document action. During the execution of this action, the system efficiently determines and populates the distribution of information into the DFKKRDI_RATE context table.

Note

It's important to note that this action primarily focuses on the preparation of distribution data and does not perform the actual revenue distribution at the PSCD document level. The distribution process is subsequently carried out by other programs as part of the broader revenue distribution workflow.

Key Parameters and Functions

  • Input parameter IT_RDI_LINES is employed to input data into the DFKKRDI_RATE table. This parameter, presented as a table, includes various fields to specify distribution information. Notably, fields such as GPART_DIS, VKONT_DIS, and VTREF_DIS are used to identify final recipients, while PARTIAL_AMOUNT and TOTAL_AMOUNT determine the distribution share of the receivables.
  • Export parameter EV_DISKEY contains the generated revenue distribution key, which is essential for subsequent actions like Create Billing Document. This key is automatically generated by the function module FKK_RDI_RATE_INSERT called within the BRFplus action.
  • To ensure the prevention of duplicate revenue distribution keys, even when the process is rerun, you can employ the duplicate prevention key with parameter IV_HANDLINGKEY.
  • The establishment of a connection to the action responsible for creating billing documents is achieved through distribution groups. These groups allow for the forwarding of billing lines containing a specific grouping to the final recipient, adhering to the defined distribution key in the action.

Priority

Specify View Priority can be configured in IMG Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → BRFplus → Specify View Priority.

In Tax and Revenue Management, it's essential to consider specific aspects related to the priority of form fields during various phases.

If your ISR scenario employs different views (for example As Filed or As Calculated) and involves fields with currency values that require processing using BRFplus expressions, you can create these expressions within the current configuration activity. This approach offers the advantage of seamless integration with the BRFplus workbench. Notably, these expressions inherently account for the view priorities you've configured in the Define Priorities of Views activity. Unlike the rigid phase priorities in the previous BRF system, BRFplus empowers you to customize phase priorities to align with your specific needs.

In the configuration, you can alter the default priority settings for form views. The system leverages this configuration to generate decision tables for form fields associated with currency types. However, exercise caution, as once a decision table is generated in the system, you cannot modify the priority.

In cases where you haven't defined a custom priority, the system relies on alphabetical order to assign priorities. You can reference the input help in the "View" column of the current configuration activity to understand how letters correspond to views.

Example

To illustrate this, consider an example: Field 4 contains the As Calculated value, which is the sum of Field 1 through Field 3. By adjusting the priority, you assign the highest priority (Priority 3) to the As Filed view (A), Priority 2 to the As Amended view (B), and Priority 1 to the As Calculated view (C). Consequently, the value for Field 4 in the As Calculated view becomes 5+7+2=14. In contrast, if you do not modify the View Priority, the Field 4 value will be 5+9+2=16, as the standard configuration reads priorities in the order of C to B to A.

This flexibility in customizing view priorities within BRFplus enhances your control over form field processing during different phases, contributing to a more tailored and efficient tax and revenue management process.

Define BRFplus Application (1 of 4)

Watch the simulation Define BRFplus Application - Part 1 to learn more about the system-related activities.

Define BRFplus Application (2 of 4)

Watch the simulation Define BRFplus Application - Part 2 to learn more about the system-related activities.

Define BRFplus Application (3 of 4)

Watch the simulation Define BRFplus Application - Part 3 to learn more about the system-related activities.

Define BRFplus Application (4 of 4)

Watch the simulation Define BRFplus Application - Part 4 to learn more about the system-related activities.

Configuration of BRFplus Integration

BRFplus function is called when a relevant business process in TRM is executed. The configuration for BRFplus TRM integrating can be done as follows,

  • Form-based processing BRFplus integration is configured in IMG Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Form Processing → Form Bundle Type → Define Form Bundle Type.
  • Object-based billing process BRFplus integration is configured in IMG Financial Accounting → Contract Accounts Receivable and Payable → Business Transactions → Public Sector Tax Assessment → Billing → Assign BRF/BRFplus Rules for Each Revenue Type.
  • Property tax BRFplus integration is configured in IMG Financial Accounting → Contract Accounts Receivable and Payable → Integration → Flexible Real Estate Management (RE-FX) → Property Tax → Activate BRFplus for the RE-FX Contract.

BRFplus Triggering Point in Form Processing

Basic Check in Tax Officer Cockpit

  • Use BRFplus to change form bundle data by changing the ISR scenario data object, the form bundle header (SYS_FORM_BUNDLE_HEADER) and so on.
  • Pressing the Basic Check button will call BRFplus and take the changed values in BRFplus to the UI Web Dynpro buffer
  • Pressing the Save button will persist the UI Web Dynpro buffer to the TRM database

Check and Calculate in Taxpayer Online Services from SAP

  • Use BRFplus to change form data by changing the ISR scenario data object 
  • Pressing the Check and Calculate button will call BRFplus and take the changed values in BRFplus to the UI buffer
  • Pressing the Save or Submit button will persist the changes to the TRM database.

Other processes, where Save or Submit actions are not expected (for example in Mass activity processing, executing the Create Tax Assessment action, or Create Master Data) you use BRFplus to change values by changing the ISR scenario data object, which is the form bundle header represented by SYS_FORM_BUNDLE_HEADER structure. You call the Form Bundle Update action in BRFplus to persist the change to the TRM database.

To update form bundle data, you can choose from three effective approaches:

  1. Tax Officer Cockpit's Basic Check:
    1. Utilize the Basic Check feature available in the Tax Officer Cockpit.
    2. Employ BRFplus to modify form bundle data, including adjustments to the Internal Service Request (ISR) scenario data object and the form bundle header (SYS_FORM_BUNDLE_HEADER).
    3. Upon clicking Basic Check, BRFplus is invoked, and the altered values are stored in the UI Web Dynpro buffer.
    4. To persist the data in the TRM database, simply click Save in the user interface Web Dynpro buffer.
  2. Taxpayer Online Services with Check and Calculate:
    1. Access Check and Calculate within Taxpayer Online Services through SAP.
    2. Leverage BRFplus to make changes to form data, specifically, the Internal Service Request scenario data object.
    3. By clicking Check and Calculate, BRFplus is triggered, transferring the modified values to the UI buffer.
    4. Subsequently, either clicking Save or Submit prompts the user interface buffer to save the data in the TRM database.
  3. Integration with Activity Processing:
    1. In scenarios where user interaction with Save or Submit is not anticipated, such as when specific actions are attached to buttons like Create Tax Assessment or Create Master Data, this approach is beneficial.
    2. Employ BRFplus to enact changes by modifying the ISR scenario data object or the form bundle header (SYS_FORM_BUNDLE_HEADER).
    3. In such cases, invoke the Form Bundle Update action in BRFplus to ensure seamless persistence of the changes in the TRM database.

These approaches offer flexibility in updating form bundle data, allowing you to choose the most suitable method based on your specific requirements and workflow.