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

program in backgroud

Former Member
0 Likes
1,360

i use this comma

"SUBMIT rm07mlbd

WITH datum IN r_datum

EXPORTING LIST TO MEMORY AND RETURN."

in my program.

i run it and it's good

but when i run it in background i get err

why?

i used this FM too

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = abaplist

EXCEPTIONS

OTHERS = 1.

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

listasci = itab

listobject = abaplist

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

maybe this the err?

1 ACCEPTED SOLUTION
Read only

former_member480923
Active Contributor
0 Likes
1,310

Hi

After you have scheduled your program in the background get the PID and go to SM50 and try to debug and find where the error is getting trigerred.

Hope its helps

Anirban

11 REPLIES 11
Read only

raguraman_c
Active Contributor
0 Likes
1,310

Hi,

But you have not mentioned what is the eror you get...

--Ragu

Read only

ashok_kumar24
Contributor
0 Likes
1,310

Hi Rani,

Try this

Submitting a report in the background and send the list to spool

  • If the program is run in the background the

  • difference report is send to spool.

SUBMIT rm07idif WITH SELECTION-TABLE li_selection

EXPORTING LIST TO MEMORY AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = li_listobject

EXCEPTIONS

not_found = 1

OTHERS = 2.

CHECK sy-subrc = 0.

CALL FUNCTION 'WRITE_LIST'

TABLES

listobject = li_listobject

EXCEPTIONS

empty_list = 1

OTHERS = 2.

IF sy-subrc <> 0.

ENDIF.

Good Luck..Reward me for the same

Thanks

Ashok

Read only

0 Likes
1,310

what's the diffrent??????

between my prog and your

Read only

former_member480923
Active Contributor
0 Likes
1,311

Hi

After you have scheduled your program in the background get the PID and go to SM50 and try to debug and find where the error is getting trigerred.

Hope its helps

Anirban

Read only

0 Likes
1,310

i know the err : it's becuase i do submit

is there another alternative

Read only

0 Likes
1,310

heyyy

i found report that i can execute prog in backgroup

it called <b>sapmsjob</b>

how can i do

merge between them

SUBMIT rm07mlbd

WITH datum IN r_datum " it chage all the time

EXPORTING LIST TO MEMORY AND RETURN.

Read only

0 Likes
1,310

hi do you can help me?????

Read only

0 Likes
1,310

See the below example to use submit in background:

DATA: number TYPE tbtcjob-jobcount,

name TYPE tbtcjob-jobname VALUE 'JOB_TEST',

print_parameters TYPE pri_params.

...

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = name

IMPORTING

jobcount = number

EXCEPTIONS

cant_create_job = 1

invalid_job_data = 2

jobname_missing = 3

OTHERS = 4.

IF sy-subrc = 0.

SUBMIT submitable TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.

IF sy-subrc = 0.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = number

jobname = name

strtimmed = 'X'

EXCEPTIONS

cant_start_immediate = 1

invalid_startdate = 2

jobname_missing = 3

job_close_failed = 4

job_nosteps = 5

job_notex = 6

lock_failed = 7

OTHERS = 8.

IF sy-subrc <> 0.

...

ENDIF.

ENDIF.

ENDIF.

Regards,

ravi

Read only

Former Member
0 Likes
1,310

Can you tell us the error message that you are getting when running it in the background? Everything looks ok at a quick glance.

Read only

Former Member
0 Likes
1,310

i can write

SUBMIT submitable TO SAP-SPOOL

SPOOL PARAMETERS WITH <b>datum IN r_datum</b>

"print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.

Read only

Former Member
0 Likes
1,310

Hi

I hope it works if you add VIA SELECTION-SCREEN addition to your code.

Regards

venkat