Hierarchy

⤷

⤷

IMG Activity
ID | OFTV_MOD_BADI_04 | BAdI: Assign Alternative Wage Types |
Transaction Code | S_ALN_01000568 | (empty) |
Created on | 20020114 | |
Customizing Attributes | OFTV_MOD_BADI_04 | SET_DIFFERENT_WAGETYPE |
Customizing Activity | OFTV_MOD_BADI_04 | Assign Different Wage Types |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | TRIP_RECURRENT_DEST |
Use
This Business Add-In (BAdI) is used in the SAP Travel Management (FI-TV) component.
Using this BAdI, you can change a chain of recurring trip destinations of an employee created by the system and convert the wage type for an outstanding travel expense report or expense report.
You can use the chain of recurring trip destinations per employee in order the change the accounting and taxation procedure after a certain period of time (for example, three months). The system always sets up a chain, or adds to an existing chain, if the travel expense reports or expense reports of the employee contain the same destination.
If you have activated chaining, the system stores the destinations of all trips in the Table of All Trip Destinations for Processing Recurring Destinations (PTRV_TRIP_CHAIN). If the system finds a destination for which the accounting and taxation method must be changed starting on a specific date, it saves that date in table PTRV_TRIP_CHAIN for all affected destinations in the field ACTION_DATE_REQ.
The BAdI contains the following methods:
- SET_DIFFERENT_WAGETYPE
The system executes this method when a travel expense report or expense report is presented for settlement. Using this method, you can assign a different wage type for settlement amounts that are after the calculated date in the field ACTION_DATE_REQ of table PTRV_TRIP_CHAIN (and thereby change the taxation method).
- ADJUST_TRIPS_FOR_CHAIN
The system executes this method after it has made a trip chain based on the address, but before it determines the date on which the accounting or taxation method is to be changed.
Using this method, you can remove individual destinations from the chain (table parameter DKE_KETTE), which are assigned, for instance, to another account assignment object other than that of the current trip.
- CHECK_ORIGINAL_CHAIN
The system executes this method before it deletes the trip chain(s). You can use this method to valuate the current cost assignment (table parameters KONTI, KOSTR, and KOSTZ) and decide which changed chains must be deleted (table parameter AEND_DATEN).
You can find an example of how to fill AEND_DATEN correctly in function module FITV_RD_START_TABLEMOD, just before calling the BAdI method.
Requirements
You have activated automatic trip chaining of recurring destinations in the Customizing activity Travel Expenses Control (Expert View), row Other Settlement, item 18, by choosing a different value for item 18 other than the default value of 0.
In the Customizing activity Check Travel Expense Constants, you have set the constants for recurring destinations (for example, REIDD, REIDM, REIMD, REIGP). With these constants, you define the time period after which the ACTION_DATE_REQ is to be set.
In the Customizing activity Define Schema and Individual Field Control or Schema and Single Field Control for Web Dynpro, you have set the Enter Addresses for Trip Destinations indicator for each trip provision variant and trip schema. In the table PTRV_TRIP_CHAIN, the system identifies a destination based on the entry of the city and street. The system chains the destinations only if these entries are exactly the same.
Standard settings
The BAdI is not active in the standard system.
Activities
Example
For example, the implementation of the method SET_DIFFERENT_WAGETYPE could look like this:
method IF_EX_TRIP_RECURRENT_DEST~SET_DIFFERENT_WAGETYPE.
data date_req type ptrv_trip_chain-action_date_req.
if t702n_r18 ne 0
and not zikey is initial
and wage_type_tax_free eq 'MJ20'.
* recurrent destination is active and this is meal per diem
* search for a required action date in PTRV_TRIP_CHAIN....
select single action_date_req from ptrv_trip_chain
into date_req
where pernr eq wa_perio-pernr
and reinr eq wa_perio-reinr
and hdvrs eq wa_perio-hdvrs
and perio eq wa_perio-perio
and pdvrs eq wa_perio-pdvrs
and rule_tag eq '3'
and zikey eq zikey.
if sy-subrc is initial and "entry found
not date_req is initial and "chain detected
date_req LE datum. "action necessary
* current date is behind trigger date: taxation is taking place!
* put meal per diem on wage type 3042
wage_type_tax_free = 'MJXX'.
endif.
endif.
endmethod.
Links
For more information on BadIs, refer to the SAP Library under SAP NetWeaver -> Application Platform (SAP Web Application Server) -> ABAP Technology -> ABAP Workbench (BC-DWB) -> Changing the SAP Standard.
Business Attributes
ASAP Roadmap ID | 257 | Create User Exits |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 1 | Critical |
Country-Dependency | A | Valid for all countries |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20050726 |
SAP Release Created in | 110 |