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

Background program

Former Member
0 Likes
553

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
524

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.

3 REPLIES 3
Read only

roland_spindler
Participant
0 Likes
524

CALL 'function module'

IN BACKGROUND TASK.

Read only

roland_spindler
Participant
0 Likes
524

By the way, SUBMIT is for reports only, not for function modules.

Roland

Read only

Former Member
0 Likes
525

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.