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

submit statement ..to execute a program in backgorund..

Former Member
0 Likes
744

hai guys,

using submit ..how can i give a program to run ion background?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
697

You can use SUBMIT TO SAP-SPOOL.

Have a look at below link:

[SUBMIT TO SAP-SPOOL |http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit_t.htm]

I hope it helps.

Best Regards,

Vibha

Please mark all the helpful answers

5 REPLIES 5
Read only

Former Member
0 Likes
698

You can use SUBMIT TO SAP-SPOOL.

Have a look at below link:

[SUBMIT TO SAP-SPOOL |http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit_t.htm]

I hope it helps.

Best Regards,

Vibha

Please mark all the helpful answers

Read only

0 Likes
697

HOW TO GET PRINT PARAMETERS?

Read only

0 Likes
697

i have given the following code..

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.

in this i havent not given any values for print_parameters...

when i execute the program..i see no effect...

like when i submited program zwrite in background, i dont find it in sm37? so wats happening to the submited job?

Read only

Former Member
0 Likes
697

Hi,

You can call one selection screen from other selection screen program using SUBMIT command.

The syntax is as follows -

codeSUBMIT... VIA SELECTION-SCREEN

USING SELECTION-SET <var>

WITH <sel> <criterion>

WITH FREE SELECTIONS <freesel>

WITH SELECTION-TABLE <rspar>.[/code]

e.g.

The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:

codeREPORT demo_program_submit_rep1.

DATA number TYPE i.

PARAMETERS paramet(14) TYPE c.

SELECT-OPTIONS selecto FOR number.[/code]

The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:

codeREPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.

DATA: int TYPE i,

rspar TYPE TABLE OF rsparams,

wa_rspar LIKE LINE OF rspar.

RANGES seltab FOR int.

WRITE: 'Select a Selection!',

/ '----


'.

SKIP.

FORMAT HOTSPOT COLOR 5 INVERSE ON.

WRITE: 'Selection 1',

/ 'Selection 2'.

AT LINE-SELECTION.

CASE sy-lilli.

WHEN 4.

seltab-sign = 'I'. seltab-option = 'BT'.

seltab-low = 1. seltab-high = 5.

APPEND seltab.

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

WITH paramet eq 'Selection 1'

WITH selecto IN seltab

WITH selecto ne 3

AND RETURN.

WHEN 5.

wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.

wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.

wa_rspar-low = 14. wa_rspar-high = 17.

APPEND wa_rspar TO rspar.

wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.

wa_rspar-low = 'Selection 2'.

APPEND wa_rspar TO rspar.

wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.

wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.

wa_rspar-low = 10.

APPEND wa_rspar TO rspar.

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

WITH SELECTION-TABLE rspar

AND RETURN.

ENDCASE.[/code]

=> To leave a called program, you can use SUBMIT .... AND RETURN. by choosing F3 or F15 from list level 0 of the called report.

Hope this helps.

regards,

venkat.

Read only

Former Member
0 Likes
697

Hi,

Refer to the following statement:

SUBMIT zbho_unix_move_and_send EXPORTING LIST TO MEMORY AND RETURN

WITH p_fname = p_f_fname "File Name

WITH p_ftpsrv = wf_server "FTP Server

WITH p_ftpfld = wf_folder "FTP Folder

WITH p_eraddr = p_email "Email Add

WITH p_unix = 'X'

WITH p_ftp = 'X'

WITH p_zip = 'X'

WITH p_stmp = 'X'.

Hope this helps.

Reward if helpful.

Regards,

Sipra