SAP ABAP IMG Activity W_WB2B_BADI_EXP1 (BAdI: Enhancements to Expense Maintenance in Global Trade Management)
Hierarchy
EA-GLTRADE (Software Component) SAP Enterprise Extension Global Trade
   LO-GT-TE (Application Component) Expenses
     WB2B_EXPENSE (Package) Trading Expense Handling
IMG Activity
ID W_WB2B_BADI_EXP1 BAdI: Enhancements to Expense Maintenance in Global Trade Management  
Transaction Code S_PLN_62000092   (empty) 
Created on 20040205    
Customizing Attributes W_WB2B_BADI   BAdI Global Trade Management 
Customizing Activity W_WB2B_BADI_EXP1   BAdI: Enhancements to Expense Maintenance in Global Trade Management 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name WB2_EXPENSE_ENHANCE    

Example

A customer enhancement is used to influence how expenses are entered, for example, default settings are created, existing data changed and messages issued in certain situations.

Requirements

Expense handling maintenance has been set up.

Standard settings

Method - AT_EXPENSE_ENTRY

This method is called before the user switches to the expense handling screen. All necessary information for the leading document and the existing expense documents are transfered. It is possible to issue an error message using 'raising customer_error'. If an error message is issued, processing is then completed. It is also possible to manipulate the existing expense data here. This can only be done in specific situations as the enhancement is only called when expense maintenance is called.

Method - WORKAREA_AUTOMATIC_CREATION

This method is called for the following automatically-created documents - "In transit stock document", "In transit stock settlement posting", and type 2 postings. The method is called after the document has been created and before any adjustments are made. All data that is required for the expense document is transferred and the data can be changed here, for example, the posting date for the document.

Method - AKA_KURO_CANCEL

This method is called when an expense document is cancelled (the leading document is cancelled) or if a single document is cancelled from the expense screen (when 'Delete' is selected but the document cannot be physically deleted). The method issues error messages or reacts when the document cannot be cancelled because the related FI document has already been settled. The method is called after the document has been cancelled. An error message is issued if an error occurs during cancellation. The user can then take the necessary steps to react to this error message.

Method - AKA_KURO_CANCEL_SINGLE

This method is similar to AKA_KURO_CANCEL. It is, however, only called if single documents have been created in the 'Cancel Expense' step in the Trading Execution Workbench (TEW).

Method - CHECK_BEFORE_CANCEL

This method is called when expense documents are cancelled. It is called before the document is cancelled. Error messages can be issued and specific documents can be excluded from cancellation.

Method - GET_EXPENSE_DATA

This method is called after all data is sent to the posting module and all generated expense document data has been transferred. The data can be used to make customer-specific adjustments to Add-On documents or to handle further processes. Method AT_EXPENSE_SAVE (see below) is called before any data is posted.

Method - CONDITION_TEXT_COPY

The default condition text is copied (in Customizing via VOTX) to the default vendor billing document text (text ID) when the planned expsnes are ste up. The new text ID can be copied if a different text ID is to be copied.

Method - AT_WORKAREA_CREATE

This method is called before expense documents are created or changed, except the documents mentioned in WORKAREA_AUTOMATIC_CREATION. This method is used to set default values for the expense documents that are to be created, for example, the VAT key and posting date.

Method - AT_EXPCLASS_F4

This method is called when calling the F4 help of the expenseclass. The values displayed in the standard are beeing transfered and can be changed here. This can be used to limit the values further for certai n purposes.

Method - AT_EXPCLASSGROUP_F4

This method is called when the F4 Help for the expense class group is called. A list of the values displayed in the standard system is generated. These values can be changed, if necessary. This method may also be used to limit certain values in specific situations.

Method - ACTIVATE_AUTOMATIC_COPY

This method is used to automatically copy expenses. This means that all conditions identified as planned expenses in the trading contract are copied to an expenses document when a the 'Create' or 'Change' function is called. Any documents or steps that are to be excluded from this should be specified in method AUTOMATIC_COPY_PARAMETERS.

Method - AUTOMATIC_COPY_PARAMETERS

Before this method can be used, you must ensure that the automatic copy function for expense conditions in the trading contract has been activated with method ACTIVATE_AUTOMATIC_COPY. Command 'raise DO_NOT_COPY' ensures that documents that are not be copied automatically are excluded.

Method - FIELDSELECTION_WORKAREA

This method influences the field selection for expense handling.

Method - SET_INVOICE_DATE_FOR_CANCEL

This method is called when an invoice is cancelled. The posting date and the pricing date of the cancellation document are influenced.

Method - ACTIVATE_CUSTOMER_SCREEN

This method activates a customer-specific Add-On screen. When this is done, a second tab appears in the expense entry screen. Before this method can be used, however, you must ensure that the following enhancements are also used and that the customer-specific screen is created correctly and activated.

Method - CUSTOMER_SCREEN_PBO

If the customer-specific screen has been activated with the method described above, the customer program and the screen number that are to be called have to be specified here. Data is transported from the standard data entry function to the customer enhancement before the data is released (PBO).

Method - CUSTOMER_SCREEN_PAI

If the customer-specific screen has ben activated with the method described above, the data is returned from the customer enhancement to the standard entry function after the data has been released (PAI).

Method - CHECK_BEFORE_CREATE_CONDITION

This method is called before an expense condition is created in the trading contract. Data is checked, messages are issued and some default data is used, for example, vendor data. The following data cannot be defaulted: the expense class, the posting type, the accounting type. Use method get_defaults_for_condition to default data for these fields.

Method - CHECK_BEFORE_CREATE_CONDITION2

This method is similiar to method CHECK_BEFORE_CREATE_CONDITION (described above). This method is, however, only called when you change an expense condition and not when the condition is created.

Method - GET_DEFAULTS_FOR_CONDITION

This method is used to create default values for the expense class, the posting type and the accounting type.

Method - AT_BEFORE_FI_RELEASED

This method is called before the created expense documents are released for FI.

Method - AT_EXPENSE_SAVE

This method is called before the created expense document is posted are data is transferred. After data is posted, method GET_EXPENSE_DATA is called with the new data (after numbering has been assigned).

Method - CHECK_BEFORE_FCODE_ONLINE

This method is called from the expense maintenance before a user command is called. A message is issued here and further processing may be blocked, if required.

Method - AT_EXPENSE_PLANNED_GET

This method is no longer used.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20040205 
SAP Release Created in 500