Uploaded by Sandip Thulkar

FM TRAVEL

advertisement
FUNCTION zhr_employeetravel.
FUNCTION Group:- ZZTRAVEL1
FUNCTION zhr_employeetravel related to employee travel booking in the Travel Portal .
INPUT :-employee id (pernr) and Trip ID ( tripnum)
OUTPUT:-employee travel booking details from below Tables .
1)
2)
3)
4)
5)
ytrip_master ( all trip details)
ytrip_iti
( Employee Travel Itinerary)
ytrip_acco (Employee Accommodation Details)
ytrip_appr_inbox (Approver's Work item details)
ytrip_app_cmnts (Approver Comments)
Used STRUCTURE for output.
1) ZYTRIP_MASTER1
2) ZYTRIP_ITI
3) ZYTRIP_ACCO
4) ZYTRIP_APP_INBOX
5) ZYTRIP_APP_CMNTS
Logic for data Fetch.
Select PERNR as l_pernr and six months back dated trips as lv_date.
If pernr is initial then fetch all employee details from Table pa0000 where employee status
is active ( stat2 = '3') and start date is less than equal to current date and
End date is Greater than equal to current date.
If active employee found then fetch data for all active employee from table PA0001 where
employee id is pernr from tale pa0001 and trip date is greater than equal to current date.
If data fetch for selected employee only :- than select table ‘ytrip_master’ and pass pernr and
lv_date .
Logic for ytrip_app_cmnts (Approver Comments)
If ytrip_master is not initial than select table ytrip_app_cmnts and pass trip number and pernr
(employee id )
For Employee Travel Itinerary select table ytrip_iti (with all entries in table ytrip_master) and pass
only trip number.
For Employee Accommodation Details select table ytrip_acco and pass only employee trip number .
For Approver's Work item details like 1st approver and 2nd approver comments than select table
ytrip_appr_inbox and pass only employee trip number.
For Approver Comments details select table ytrip_app_cmnts and pass only trip number .
Call function CONVERSION_EXIT_ALPHA_INPUT for getting cost_center and alt cost_center also.
Call function BAPI_EMPLOYEE_GETDATA for getting employee personal data .
CALL FUNCTION 'GET_DOMAIN_VALUES for getting domain values for travel class.
CALL FUNCTION 'DDIF_FIELDINFO_GET' for getting employee accommodation type.
IN PUT :-
Out put from QAS:
IT_YTRIP_MASTER
IT_YTRIP_ITI
IT_YTRIP_ACCO
IT_YTRIP_APPR_INBOX
IT_YTRIP_APP_CMNTS
Download