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 and return

Former Member
0 Likes
2,274

Hi ,

i am calling the std program RFBIBl00 in my report thru submit. when the RFBIBL00 is called the execution halts at the output screen. I need to bypass the screen and come to my calling program execution.

how to handle it ?

Your ideas are appreciated.

Thanks,

Stock.

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,732

Hi,

You can use SUMBIT AND RETURN to return to the calling program.

See the documentation for SUBMIT keyword.

Here is what AND RETURN does

... AND RETURN

<b>Effect</b>

The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:

Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.

As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.

The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.

Regards,

Sesh

7 REPLIES 7
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,733

Hi,

You can use SUMBIT AND RETURN to return to the calling program.

See the documentation for SUBMIT keyword.

Here is what AND RETURN does

... AND RETURN

<b>Effect</b>

The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:

Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.

As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.

The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.

Regards,

Sesh

Read only

0 Likes
1,732

Hi ,

I have used Submit and Return then too it halts at the output of the called program.

Thanks,

Stock

Read only

0 Likes
1,732

Hi,

Check in debug mode if it is coming back to the Calling program or not.

If you use SUBMIT and RETURN this should come back to the calling program.

Check in debug mode for the statement SUMBIT. Put a break point after the SUBMIT statement and see if this ponit is reached or not?.

Regards,

Sesh

Read only

0 Likes
1,732

Hi..

In this case we can send the Output of the Called Report to SPOOL instead of display.

Check the Syntax example below.

DATA: PARAMS LIKE PRI_PARAMS,

DAYS(1) TYPE N VALUE 2,

COUNT(3) TYPE N VALUE 1,

VALID TYPE C.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING DESTINATION = 'LT50'

COPIES = COUNT

LIST_NAME = 'TEST'

LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'

IMMEDIATELY = 'X'

RELEASE = 'X'

NEW_LIST_ID = 'X'

EXPIRATION = DAYS

LINE_SIZE = 79

LINE_COUNT = 23

LAYOUT = 'X_PAPER'

SAP_COVER_PAGE = 'X'

COVER_PAGE = 'X'

RECEIVER = 'SAP*'

DEPARTMENT = 'System'

NO_DIALOG = ' '

IMPORTING OUT_PARAMETERS = PARAMS

VALID = VALID.

IF VALID <> SPACE.

SUBMIT RSTEST00 TO SAP-SPOOL

SPOOL PARAMETERS PARAMS

WITHOUT SPOOL DYNPRO.

ENDIF.

<b>Reward if Helpful</b>

Read only

0 Likes
1,732

Hi,

Itried with the above logic.

But on submit to the standard program RFBIBL00, the session of error records has to be created in SM35.

On bypassing the output screen this session is not created in SM35.

Any other work around ?

Thanks,

Stock.

Read only

0 Likes
1,732

Hi..

In this case you can Create a Background job dynamically which executes your program in Background and creates the session.

<b>Check this Example code below:</b>

Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately providing the user has the relevant authorization.

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.

******Here you have to call GET_PRINT_PARAMETERS FM

<b> SUBMIT submitable TO SAP-SPOOL

SPOOL PARAMETERS print_parameters

WITHOUT SPOOL DYNPRO

VIA JOB name NUMBER number

AND RETURN.</b>

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.

Reward if Helpful

Read only

Former Member
0 Likes
1,732

take F1 help for submit

u can see submit and return options

which will take your control back to your calling program