Functionality The method EmployeeTrip.GetOptions> designates all tables andparameters which could be required for creating a trip usingtransaction PR01 or PR05. The import parameter EmployeeNumber> determines the personnelnumber for which the local work space is to be created, Date>determines the date for which the table entries should be read and theLanguage> parameter determines the language for the tableentries. By means of the import parameter Select_Last>, you can determinewhether the values in tables Countries> and Currencies> areread from the Customizing tables (Select_Last = Space), or whether thevalues in these tables are determined from the last trips (Select_Last= "X"). In the latter case, parameter Scan_X_Trips> determinesthe number of trips to be searched. The table Cost_Objects> is only filled if the Select_Lastparameter has the value "X" and, in this case, contains the last costobjects posted to by the employee. The Select_Last> parameter especially gives you the possibilityto prepare a kind of short F4-Help for these fields, since the completecountry and currency tables can be very lengthy. The status of the method call can be determined from the returnparameter Return> after the method has been performed.Notes Most of the return tables are Travel Management Customizing tables.Although it would be possible to read these tables via BAPIF4-Help>, some of these tables also contain additional authorizationfields that are employee-specific. Consequently, the use of generalBAPI-F4-Help would lead to many more table entries and make calling themethod EmployeeTrip.CreateFromData> more difficult.Further information For more information, especially concerning individual table fields,see the structure documentation for the tables DEFAULTS, EXPENSE_TYPESand COST_OBJECTS or the relevant structures for the tables in the DataDictionary. Description Personnel number Description The table Cost_Objects> contains the account assignment objectslast used by the employee and is only filled if the parameterScan_Last> is set.Description The table Defaults> contains the parameters
- Firstday> (not needed to create via PR01 and PR05)
- CCCParam> (TRVPA, switch CCC; see feature documentation),
- Rec_F_PD> (TRVCT, F line, position 1; see documentation on
feature TRVCT),
- Rec_U_PD> (TRVCT, U line, position 1; see above)
- Rec_V_PD> (TRVCT, V line, position 1; see above)
- Tac_Code_0> (Table T706D, MWAUS) and
- Mileage_PD> (Reimbursement amount per mile/kilometer for the
first mile/km of the trip in the employee's local currency; If mile/kmaccumulation is not active, this rate applies for the entire trip,otherwise it can vary!).Description The table Expense_Types> contains the trip expense types whichare valid at the date> for the specified employee. The table has the following fields:
- PR04_Sort>: Sorting sequence of trip expense types in the weekly
report (is only needed to display trip expense types in spreadsheetsbut has no effect if one of the create methods is called)
- EXP_Type>: Key for trip expense type
- TAX_CODE>: Default sales tax indicator for domestic receipts
- EXP_CATE>: Key for trip expense category
"M" and "V" for meals receipts "U" for accommodations receipts "F" for travel costs receipts "S" for other receipts
- PAID_COM>: Indicator for receipt paid by company
- MAX_AMOUNT>: Maximum receipt amount according to customizing
(capping limit)
- CURRENCY>: Currency of maximum receipt amount
- MESS_FLAG>: No longer used as of 4.0!
- SCDV1>: Field control for start date
The values for field control can have the following characteristics(these values are also valid for the other field control parameters): "+" : This field is a mandatory entry field "-" : This field is not visible (suppressed and not ready for input) "." : This field is ready for input SPACE: This field is only displayed
- SCDB1>: Field control for end date
- SCANZ>: Field control for number
- ANZCA>: Calculation of a default value for the number field
SPACE: No calculation of default value "0" : Difference in dates, but at least 1 day "1" : Difference in dates plus 1 day
- SCLND>: Field control for country and region
- SCRAU>: Field control for enterprise-specific trip type
- SCFRF>: Field control for number of breakfasts
- SCDEC>: Field control for description
- SCPLA>: Field control for location
- SCBPU>: Field control for reason for receipt
- SCBRE>: Field control for business partner
- SCEDT>: Field control for editor (not yet supported!)
- EXP_TEXT>: Name of trip expense type
The parameters for field control determine especially whether certainreceipt information is absolutely necessary when the methodEmployeeTrip.CreateFromData> is used or whether it can beomitted. The method above returns an error message if a mandatory fieldwas not supplied with a value.
|