Hi,
There is no background job shceduling. Just an activity step is used and a class and its method is called. In the method FM having above code is called. See as below :
METHOD copy_attachment.
CALLFUNCTION'ZHREXP_ATTACHMENTS_TO_WI'
EXPORTING
im_workitemid = i_workitem
im_pernr = i_pernr
im_reinr = i_reinr
EXCEPTIONS
no_attachment_found = 1
error_reading_attachment = 2
error_instantiating_attachment = 3
OTHERS = 4.
ENDMETHOD.