Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module HRCM_ORGSTRC_INFO_TABLE_GET gives different results in background

0 Likes
1,043

I am running a report which calls function module HRCM_ORGSTRC_INFO_TABLE_GET. When the report is run in the foreground the function module returns 8 org units when run in the background in the same client with the same parameters it returns 1. Why is this?

CALL FUNCTION 'HRCM_ORGSTRC_INFO_TABLE_GET'
EXPORTING
plvar = i_plvar
root_otype = 'O'
root_objid = i_objid
begda = sy-datum
endda = sy-datum
path_id = 'ORGEH'
path_depth = i_depth
TABLES
org_info_table = e_orgs
EXCEPTIONS
path_error = 1
root_error = 2

OTHERS = 3.

1 ACCEPTED SOLUTION
Read only

BGarcia
Active Contributor
853

Hi Sean,

If you debug the background job are you able to confirm that all the exporting parameters (and user) are the same as when called in foreground?

Kind regards,

Garcia

3 REPLIES 3
Read only

BGarcia
Active Contributor
854

Hi Sean,

If you debug the background job are you able to confirm that all the exporting parameters (and user) are the same as when called in foreground?

Kind regards,

Garcia

Read only

853

The problem was the batch user the job was running under. The program produces an interface file sent via PI so I ran the under batch user XIAPPLUSR, this doesn't work. I changed the user to BATCHUSRHR and it now works

Read only

AndyBoolean
Participant
0 Likes
853

Hi sean.heffernan,

Are you using another user for background procssing?
It still depends on how exactly the evaluation path resolvs ORGEH. I don't have a system to check that right now. But if it uses the current user, it will not work anymore, as you can see.

Best regards,
Andy