on 04-29-2014 6:49 PM
Hi guys,
In our system we have do not have enable Travel Planning. We're using Travel Services to enter Basic Information. The thing is that the Travel Coordinator wants to be able to modify the Travel Services entered by the employee during the Approval Process.
I just copied workflow 20000050, and I've added a Form Step:
I would like to know what's the best way to modify these services. Is there a BAPI, or a FM to accomplish it?
Thanks,
Raúl
I ended up using a Form Step within the workflow.Travel services can be saved using FM PTRA_WEB_EXPENSE_REPORT_SAVE_2. SAP hasn't released a BAPI for this matter.
If it's useful for someone, here it is what I did:
DATA: wa_general_data_ext TYPE ptrv_web_general_data_ext,
wa_general_data TYPE ptrv_web_general_data_int,
it_service TYPE STANDARD TABLE OF ftps_web_request_service,
it_return TYPE bapirettab,
wa_return TYPE bapiret2,
v_saved_success TYPE xfeld.
FIELD-SYMBOLS: <fs_service> LIKE LINE OF it_service.
* Merge Travel Services
APPEND LINES OF it_flight TO it_service.
APPEND LINES OF it_hotel TO it_service.
APPEND LINES OF it_car TO it_service.
LOOP AT it_service ASSIGNING <fs_service> WHERE request IS INITIAL.
PERFORM calculate_estimated_cost.
<fs_service>-request = v_next_number.
ADD 1 TO v_next_number.
ENDLOOP.
* Move Estimated Cost
CALL FUNCTION 'PTRA_WEB_GENERAL_DATA_GET'
EXPORTING
i_employeenumber = ftpt_req_head-pernr
i_tripnumber = ftpt_req_head-reinr
IMPORTING
e_general_data = wa_general_data_ext
TABLES
et_return = it_return.
wa_general_data_ext-estimated_cost = v_tr_total.
MOVE-CORRESPONDING wa_general_data_ext TO wa_general_data.
* Save Travel Request
CALL FUNCTION 'PTRA_WEB_EXPENSE_REPORT_SAVE_2'
EXPORTING
i_employeenumber = ftpt_req_head-pernr
i_tripnumber = ftpt_req_head-reinr
i_trip_component = 'R'
i_general_data = wa_general_data
it_req_service = it_service
IMPORTING
ev_saved_successful = v_saved_success
TABLES
et_return = it_return.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raul,
Correct me if I didnt understand your question correctly?
If employee has entered travel request details and this needs to be changed by travel coordinator ? Am I right.
Then you dont need BAPI. You have my team option and once you assign it to travel coordinator id, then can add the employee in my team and make the respective changes.
Please do let me know if you need further information.
Srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply Srikanth!
That's the situation. In addition, the company travel policies require 3 approvals. The second one is the revision by the Travel Coordinator, and right after that, it's supposed to go to the Division Manager. The Div. Manager is only interested in the total price, which is entered/modified by the Travel Coordinator.
That's why I decided to add a "Form Step" in the workflow.
Do you think "My Team" service is going to work in this case?
Regards,
Raúl
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.