Application Development 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: 

Submit a program but I donu00B4t want to see the slection screen of this progra

Former Member
0 Kudos

Hi expert.

I have a problem. I am calling a program B from another program A using a SUBMIT statment. I am passing the parameters of the selection screen of the program B with the instruction VIA SELECTION SCREEN. The problem is that the program B shows a informatin message anf the selection screen appears; and i don´t weant this, I don´want that the selection screen apeear. Spme body can say me how can I make this??

Thanks

12 REPLIES 12

Former Member
0 Kudos

Hello,

If you use VIA SELECTION-SCREEN the screen will be showed, try using USING SELECTION-SCREEN.

*... VIA SELECTION-SCREEN *

Effect

If this addition is specified, the selection screen is displayed on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are triggered without the selection screen being displayed

*... USING SELECTION-SCREEN dynnr *

Effect

This addition specifies which selection screen is called. dynnr is a data object that must contain the screen number of a selection screen defined in the called program when the SUBMIT statement is called.

If the addition USING SELECTION-SCREEN is omitted or the screen number 1000 is entered, the standard selection screen is called. If no standard selection screen is defined in the called program, no selection screen is called.

If a screen number that is not 1000 is entered in the addition USING SELECTION-SCREEN, the corresponding independent selection screen is called. If no selection screen with this screen number is defined in the called program, this leads to an untreatable exception.

Example:

The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.

Program accessed

REPORT report1.

DATA text TYPE c LENGTH 10.

SELECTION-SCREEN BEGIN OF SCREEN 1100.

SELECT-OPTIONS: selcrit1 FOR text,

selcrit2 FOR text.

SELECTION-SCREEN END OF SCREEN 1100.

...

Calling program

REPORT report2.

DATA: text TYPE c LENGTH 10,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

Regards.

former_member195383
Active Contributor
0 Kudos

try to run the second report in background.....

SUBMIT zprogram

AND RETURN

VIA JOB wf_jobname NUMBER wf_jobcount

TO SAP-SPOOL WITHOUT SPOOL DYNPRO

KEEP IN SPOOL xflag_gc.

zprogram is the program u r caling.....

Reward points if useful....

former_member188685
Active Contributor
0 Kudos

in that case don't use VIA selection screen.

use the selection table , with option.

.

0 Kudos

Sorry, my code is the next.

SUBMIT rllnach1 VIA JOB l_jobname NUMBER l_jobcount

AND RETURN WITH SELECTION-TABLE itab.

Former Member
0 Kudos

HI,

Instead of using VIA SELECTION-SCREEN, use [WITH SELECTION-TABLE <rspar>] where rspar will be of type RSPARAMS and use

SUBMIT WITH SELECTION-TABLE rspar .....AND RETURN.

Regards,

Mohaiyuddin

0 Kudos

Sorry, my code is the next.

SUBMIT rllnach1 VIA JOB l_jobname NUMBER l_jobcount

AND RETURN WITH SELECTION-TABLE itab.

0 Kudos

Hi,

Create a background job for the same and try it.

Raghav

0 Kudos

Thanks but i can´t make this because my parameters are flexible.

0 Kudos

In that case, selection screen of Program B cannot appear, as Program B will be executed in background via JOB.

Regards,

Mohaiyuddin

0 Kudos

Hi

I´m runnin the second program throw job but the screen apeears

SUBMIT rllnach1 VIA JOB l_jobname

0 Kudos

Fill itab first with all mandatory fields.

Also don't forget to OPEN JOB first, get the jobcount and pass it to l_jobcount before submitting program B.

Use WITH SELECTION-TABLE ....AND RETURN.

CLOSE JOB after this..

SUBMIT rllnach1 VIA JOB l_jobname NUMBER l_jobcount

WITH SELECTION-TABLE itab AND RETURN

Regards,

Mohaiyuddin

Former Member
0 Kudos

the easiest Option u can use is

let ur selection screen parameters of program B be s1,s2,,s3---

let the values u get in Programs A be v1,v2-----

Submit B with s1 = v1

s2 = v2

s3 = v3

...................... and return.

regards

DEvanand