‎2014 Oct 13 10:29 AM
Hi gurus,
I've developed an upload program which reads the data from interface file and perform hiring for new employee. When i execute the program via foreground there is no error and the employee is hired successfully. However, when i set the program to execute via background, it will throw error "Fill in all required field".
The below is the FM that i've inserted and it worked fine during foreground. Any ideas why in background it will throw such errors? Anyway i can debugged it?
Thanks and regards,
Loo
‎2014 Oct 13 10:53 AM
From the fact that this FM has a parameter dialog and the description of the error I'm guessing it carries out a GUI mediated file upload. When a program is run in background the server process isn't connected to any fronted application server so GUI mediated uploads are not possible.
To read a file in background you would have to upload to the application server and read it from there.
If this isn't the problem then please provide the dump description,
‎2014 Oct 13 9:00 PM
Hi Loo
Just a suggestion. Won't it be better if you use BAPI_HRMASTER_SAVE_REPL_MULT.
Give it a try.
Thanks,
Harsh
‎2014 Oct 13 11:25 PM
Hi Loo,
FM HR_MAINTAIN_MASTERDATA is not released for customer use by SAP(Check this SAP Note 1913529)
Use the FM HR_PAD_HIRE_EMPLOYEE instead.
Regards,
Ashvin
‎2014 Oct 14 6:25 AM
Hi Loo,
In the dialog_mode parameter what your are passing for background ?
check the dialog_mode Parameter.
for foreground it is '1' and for background it is '0'.
Please find the below documentation for dialog_mode parameter,
You specify here whether the action is to be processed in the background in general, whether the action is to be processed in the background until an error occurs, or whether the change is to be made in a dialog box.
You can submit one of three values: ‘0’, ‘1’, or ‘2’, which mean the following:
The default value is ‘0’, meaning that the process runs in the background.
I hope this will be helpful.
Thanks & Regards,
Raghunadh Kodali.