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

how to avoid selection-screen?

Former Member
0 Likes
1,063

Hi,

i have this short report:


TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
*
AT SELECTION-SCREEN.
  IF SY-BATCH = 'X'.
* how to avoid selection screen
  ENDIF.
*
************************************************************************
START-OF-SELECTION.
*
  SELECT * FROM MARA WHERE MATNR IN S_MATNR.
    WRITE: / MARA-MATNR.
  ENDSELECT.
*
END-OF-SELECTION.

in batch i don't want the selection-screen. Is it possible? How can i do this?

Thanks.

regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,028

Hi,

When You have Select-options and parameters in your program you cannot avoid selectio-screen..try not to use any of the above options if you do not want a selection screen.hope the info is helpful.

Regards

Vasavi kotha

10 REPLIES 10
Read only

Former Member
0 Likes
1,028

hi,

at selection-screen on output

event

it solves.

Read only

Former Member
0 Likes
1,028

sorry,

check it is

at selection-screen output

Read only

Former Member
0 Likes
1,029

Hi,

When You have Select-options and parameters in your program you cannot avoid selectio-screen..try not to use any of the above options if you do not want a selection screen.hope the info is helpful.

Regards

Vasavi kotha

Read only

Former Member
0 Likes
1,028

Hi,

Try this,

IF SY-BATCH = 'X'.

AT SELECTION-SCREEN.

LOOP AT SCREEN.

screen-active = 0.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:59 AM

Read only

Former Member
0 Likes
1,028

Hi,

Check it it may help you.


at selection-screen output.
  if p_offcyc = 'X'.
    loop at screen.
      if screen-group1 = 'AAA'.
        screen-input = 0.
        modify screen.
      endif.
    endloop.
  endif.

Regards,

BBR.

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:59 AM

Read only

Former Member
0 Likes
1,028

Hi,

You cant avoid the selection-screen here. Whats your exact requirement?

Regards

Sandeep Reddy

Read only

0 Likes
1,028

Hi,

thanks for your answer. What i want is, that when specific conditions are given (for example: sy-batch, sy-user, test or prod-system etc.) we dont't want to use the selection-screen.

Regards, Dieter

Read only

RoySayak
Active Participant
0 Likes
1,028

Hi,

If u don't want Selection-Screen in batch job..

just put NO-DISPLAY after the select-option and parameter u using in that.

changing your code:

TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR *NO-DISPLAY*.
*
AT SELECTION-SCREEN.
  IF SY-BATCH = 'X'.
* how to avoid selection screen
  ENDIF.
*
************************************************************************
START-OF-SELECTION.
*
  SELECT * FROM MARA WHERE MATNR IN S_MATNR.
    WRITE: / MARA-MATNR.
  ENDSELECT.
*
END-OF-SELECTION.

Hope it works..

Best Regards,

Sayak

Read only

Former Member
0 Likes
1,028

while declaraing select-option write


SELECT-OPTIONS: S_MATNR FOR MARA-MATNR MODIF ID m1.

and inside


AT  selection-screen output 
IF sy-batch  = 'X'. 
    LOOP AT SCREEN . 
      IF screen-group1 = 'M1'.
        screen-invisible  = '1'.
        screen-output = '0'.
        screen-input = '0'.
        MODIFY SCREEN .
      ENDIF. 

try this it will work .

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 11:00 AM

Read only

Former Member
0 Likes
1,028

> Hi,

>

> i have this short report:

>

>


> TABLES: MARA.
> SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
> *
> AT SELECTION-SCREEN.
>   IF SY-BATCH = 'X'.
> * how to avoid selection screen
>   ENDIF.
> *
> ************************************************************************
> START-OF-SELECTION.
> *
>   SELECT * FROM MARA WHERE MATNR IN S_MATNR.
>     WRITE: / MARA-MATNR.
>   ENDSELECT.
> *
> END-OF-SELECTION.
> 

>

> in batch i don't want the selection-screen. Is it possible? How can i do this?

>

> Thanks.

>

> regards, Dieter

Please check the value of the variable sy-binpt, I believe the value of the variable sy-binpt will be set to 'X' if the program is called from a bath input, hope this helps.