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

Usage of submit and return statement

Former Member
0 Likes
451

Hi

Iam using the follwing code for creating planning file entries.

SUBMIT RMMDVL20

WITH PLSCN = 001(001 is the input to the report)

AND RETURN.

This report is used to create planning file entries for 001.

After i execute this code i am getting a screen with output displaying 'Planning file entries has been created'.

If i get this screen,i should press BACK button to continue to my code...

But my requirement is after submitting this stmt,without displaying the screen i should continue to next stmt in my code...

Awaiting for ur reply...

Hi

Iam using the follwing code for creating planning file entries.

SUBMIT RMMDVL20

WITH PLSCN = 001(001 is the input to the report)

AND RETURN.

This report is used to create planning file entries for 001.

After i execute this code i am getting a screen with output displaying 'Planning file entries has been created'.

If i get this screen,i should press BACK button to continue to my code...

But my requirement is after submitting this stmt,without displaying the screen i should continue to next stmt in my code...

Awaiting for ur reply...

1 REPLY 1
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
356

Hi,

You can try to SUBMIT to this program in the background using a JOB.

For example see this

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.

For more details check the documentation of SUBMIT in ABAPDOCU transaction.

Regards,

Sesh