Fonction SAP BAPI_TRIP_COLLECT_MILEAGE - Determination of Trip Legs for Employee

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
EMPLOYEENUMBER BAPIEMPL-PERNR N 8 Personnel Number
FROM_DATE BAPITRIP-DEP_DATE D 8 Beginning Date of Selection Interval
TO_DATE BAPITRIP-DEP_DATE D 8 End Date of Selection Interval
VEH_CLASS BAPITRVMIL-VEH_CLAS C 3 X Vehicle Class
VEH_TYPE BAPITRVMIL-VEH_TYPE C 1 X Vehicle Type

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN u 452 Return Structure

Paramètre Reférence Long. Facultatif Description
MILEAGE BAPITRVMIL 181 Trip Segments

Functionality
IMPORTING:
This method returns per personnel number the miles or kilometerstraveled by an employee within a time interval.
Transfer parameter: EMPLOYEENUMBER FROM_DATE TO_DATE.
There is the additional option to limit the search to a certain vehicletype and class.
Transfer parameter: VEH_TYPE VEH_CLASS.
EXPORTING:
The RETURN structure indicates the success (value 'S') or failure(value 'E') of the search.
RETURN (STRUCTURE BAPIRETURN)
TYPE Message type: S success, E error
CODE Message code
MESSAGE Message text
LOG_NO Application log: log number
LOG_MSG_NO Application log: sequential number
TABLES:
The miles/kilometers determined are returned to the table MILEAGE withexact dates.
If no legs of trips are found to meet the selection conditions, thetable MILEAGE remains empty and the RETURN structure contains a successmessage.

Description
Personnel number