‎2007 Jan 23 2:49 PM
Hi,
I need to execute a Function module in background, can anyone suggest some ways with syntax for the same. One way is 'SUBMIT', need to find some other way as this way its giving me dump.
Regards,
Gautam
‎2007 Jan 23 2:56 PM
Hi Goutam
CALL FUNCTION (FM name ) IN BACKGROUND TASK.
This will process the FM as a separate task in the background and the control will come back to the program.
SUBMIT is for Reports only. You can SUBMIT a program inside the FM but you cannot SUBMIt the FM.
I think that is why you get the dump.
e.g
CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
IN BACKGROUND TASK
DESTINATION DEST
EXPORTING
TAMODE = MODE
TABLES
CUSTTAB = CUSTITAB.
The following are the additions that are possbible and is got from SAP Help
1. ... AS SEPARATE UNIT
2. ... DESTINATION dest
3. ... EXPORTING p1 = f1 ... pn = fn
4. ... TABLES p1 = itab1 ... pn = itabn
Hope this helps.
‎2007 Jan 23 2:51 PM
‎2007 Jan 23 2:51 PM
By the way, SUBMIT is for reports only, not for function modules.
Roland
‎2007 Jan 23 2:56 PM
Hi Goutam
CALL FUNCTION (FM name ) IN BACKGROUND TASK.
This will process the FM as a separate task in the background and the control will come back to the program.
SUBMIT is for Reports only. You can SUBMIT a program inside the FM but you cannot SUBMIt the FM.
I think that is why you get the dump.
e.g
CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
IN BACKGROUND TASK
DESTINATION DEST
EXPORTING
TAMODE = MODE
TABLES
CUSTTAB = CUSTITAB.
The following are the additions that are possbible and is got from SAP Help
1. ... AS SEPARATE UNIT
2. ... DESTINATION dest
3. ... EXPORTING p1 = f1 ... pn = fn
4. ... TABLES p1 = itab1 ... pn = itabn
Hope this helps.