Application Development 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: 

FM in background process

Former Member
0 Kudos

Hi All,

I hve to process a FM in background process.

Firstlly i scheduled a report through

1-call function 'JOB_OPEN'

2-SUBMIT (jobname) and return

3-call function 'JOB_CLOSE'

by this i scheduled my job succesfully.

but i hve to scheduled my job for FM.

so i used

CALL FUNCTION 'Y_WS4_WRK' in background task

DESTINATION 'NONE' AS SEPARATE UNIT

buy i'm unble to see there result in sp01, sm37 , sm58 n without adding " in background task it's giving right result.

pls help me how to get my result

regards,

Anuj

3 REPLIES 3

former_member223537
Active Contributor
0 Kudos

Hi Anuj,

CALL THE FM directly without background task if you are using JOB_OPEN etc.

CALL THE FM WITH BACKGROUND TASK if you are not using JOB_OPEN, SUBMIT etc. i.e. If you are having a program which would be executed in foreground & want the FM to be executed in background in asynchronus mode, then call it in Background task.

Best regards,

Prashant

former_member195698
Active Contributor
0 Kudos

whenever a FM is executed in Background task, the processing of the FM starts only when a "COMMIT WORK" statement is encountered during the remaining processing.

So you need to explicitly call "COMMIT WORK" for you background FM to be processed.

Former Member
0 Kudos

thanx all.