and more in a single search tool across platforms. Read the announcement here. |
04/01/2024 10:25 PM - edited 04/01/2024 11:52 PM
Hi,
As per Saviynt SAP Integration guide, Manager data cannot be imported using Standard SAP HR Tables method as the manager data is stored in a separate HR table. Please let us know if this is possible with a complex query. If so, please provide the query and recommend the better approach for importing users from SAP.
Thanks,
Divya
04/03/2024 01:46 AM
Hello @DivyaBharatha,
You need to ask your SAP team to create the custom function module.
and you can use the FM approach for impoting the users.
For Ref : https://docs.saviyntcloud.com/bundle/SAP-v24x/page/Content/Configuring-the-Integration-for-Importing...
Thanks.
04/03/2024 01:56 AM
Thanks for the reply.
Client wants go with Standard HR Table method, is there a way to fetch the manager data by using this approach?
Thanks,
Divya
04/03/2024 02:07 AM
Hello @DivyaBharatha,
No, it wont be possible to do it via standard table approach.
Thanks.
04/03/2024 03:34 AM
Thanks for the confirmation.
Could you please also provide an example of writing back data to SAP?
Thanks,
Divya
04/03/2024 08:15 PM - last edited on 04/04/2024 06:30 AM by Dave
FUNCTION Z_UPDATE_MANAGER_DATA.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(i_employee_id) TYPE <employee_id_type>
*" VALUE(i_new_manager_id) TYPE <manager_id_type>
*" EXPORTING
*" VALUE(e_result) TYPE c
*"----------------------------------------------------------------------
DATA: ls_employee TYPE employee_structure,
ls_manager TYPE manager_structure,
lv_result TYPE c.
SELECT SINGLE * FROM employee_table INTO ls_employee
WHERE employee_id = i_employee_id.
IF sy-subrc = 0.
SELECT SINGLE * FROM manager_table INTO ls_manager
WHERE manager_id = i_new_manager_id.
IF sy-subrc = 0.
ls_employee-manager_id = ls_manager-manager_id.
UPDATE employee_table FROM ls_employee.
lv_result = 'S'. " Success
ELSE.
lv_result = 'E'. " Error: Manager not found
ENDIF.
ELSE.
lv_result = 'E'. " Error: Employee not found
ENDIF.
e_result = lv_result.
ENDFUNCTION.
In this example:
[This post has been edited by a Moderator to change formatting.]