转 Triggering Workflow using Business Transaction Events

Triggering Workflow using Business Transaction Events (BTE)

from Link

 

What are Business Transaction Events?

·        The enhancement technique (Open FI) that were developed for Financial Accounting Component.

·        Open FI is based upon the following principles:

o       Application developers must define their interface in a function module, an assignment table is read in the accompanying code and the customer modules assigned are called dynamically.

·        This can be easily adopted / customized to the business needs wherein SAP does not provide the standard functionality through customization or enhancements. This functionality is primarily used in FI in the areas of dunning, credit management, banking etc. For Example: Standard Dunning functionality in SAP sends the notice to the Pay to partner function (based on the partner functions in SD module i.e. pay to hits the books in Accounts Receivable in FI module), whereas the requirement could be to send the same to Bill to party, based on the premise that the original invoice was sent to him as per the partner functions in SD.  

Basic steps in configuring the Business Transaction Events:

Company A would like to fill the Assignment field with custom value ‘Demo BTE’ when an accounting document is posted for a certain Company Code for accounting purposes to analyze the data. To accomplish this requirement, Company A will use the Business Transaction Event 1120, Post Document: SAP Internal Field Substitution. Depending on the business scenarios, generally the reference document number field and assignment number field will be populated with a unique identifier for analyzing the accounting data. For the purpose of this document, I have used a scenario of populating the text field while creating accounting document. 

·        IMG Menu Path: Financial Accounting ->Financial Accounting Global Settings->  Business Transaction Events-> Environment-> Infosystem (Processes).

转 Triggering Workflow using Business Transaction Events

·        Execute the search with the defaults.

转 Triggering Workflow using Business Transaction Events 

·        Find the correct interface for updating the document.

转 Triggering Workflow using Business Transaction Events 

·        Place the cursor on the key 00001120 and click on Sample Function Module

·        This navigates you to SE37 – Function Builder. This is the function module (SAMPLE_PROCESS_00001120) we would need to copy into a Z or Y function module for coding

·        Click on copy button.

转 Triggering Workflow using Business Transaction Events 

·        Specify the function module name and the function group.

·        Now in the SE37 screen, click on change button and enter the following code:

转 Triggering Workflow using Business Transaction Events 

·        Save and activate the function module

·        Go back to the first screen by multiple clicking on BACK.

转 Triggering Workflow using Business Transaction Events 

·        To assign function module to the event, we need to create a product, say ZPRODUCT. Click as shown below:

转 Triggering Workflow using Business Transaction Events 

·        Click on New entries.

转 Triggering Workflow using Business Transaction Events 

·        Ensure that the Active check box is checked, otherwise BTE wouldn’t trigger.

·        Now we need to assign the function module created earlier to the event

·        Click as per the following screenshot:

转 Triggering Workflow using Business Transaction Events 

·        Click on new entries and create the following entry for 00001120:

转 Triggering Workflow using Business Transaction Events 

·        Test the BTE by creating a document through FB01 transaction.

·        To check whether the assignment field is filled with “Demo BTE”, display the created accounting document from FB03 and check for the Assignment value.

转 Triggering Workflow using Business Transaction Events 

转 Triggering Workflow using Business Transaction Events

Double click on the item.

转 Triggering Workflow using Business Transaction Events 

Triggering business object events:

 Update the Z function module that is created earlier by calling the function module SWE_EVENT_CREATE to trigger a business object event. Link this event to the workflow. To know about triggering an event programmatically, click here. 

你可能感兴趣的:(transaction)