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

Reg:Skipping Selection screen

Former Member
0 Likes
2,392

Hi Experts,

My requirement is that i have a executable program with selection screen and the output will be of ALV display.

For some users i need to take them directly to the ALV display without displaying selection parameters .

Regards,

Vikram sukumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,353

Hi,

try this logic it works.

declare a selection screen with number

SELECTION-SCREEN BEGIN OF SCREEN 100.

parameter p_matnr type matnr.

SELECTION-SCREEN END OF SCREEN 100.

if sy-uname ne 'CHACX074'.

call the selection screen only if the particular user needs screen.

call screen 100.

else.

p_matnr = '100'.

endif.

write : p_matnr.

When you are creating TCODE dont specify the Selection screen . as its determine by the program.

by this you can use single TCODE.

Regards,

Shanmugavel Chandrasekaran

Edited by: shanmugavel chandrasekaran on Mar 10, 2010 6:37 AM

Hi Experts,

My requirement is that i have a executable program with selection screen and the output will be of ALV display.

For some users i need to take them directly to the ALV display without displaying selection parameters .

Regards,

Vikram sukumar

15 REPLIES 15
Read only

former_member194669
Active Contributor
0 Likes
2,353

Try to write a wrapper program say for example.

Your program is A (with selecton screen and ALV)

you call this program A from program B with


submit A and return

Read only

0 Likes
2,353

Hi a®s ,

Thanks, that was helpful but i need to achieve this in single program.

Regards,

Vikram Sukumar

Read only

0 Likes
2,353

in load or program LOAD-OF-PROGRAM or initialization event check sy-user and handle it...Hope it helps

Read only

Former Member
0 Likes
2,353

Hi,

You can try this way.

Create 2 Tcode as below.

1. For the User to have Selection screen : Create a Tcode normal by selecting the "Program and Selection Screen (Report Transaction)".

2.For the User without Selection screen: Create Tcode by using "Transaction with Parameters (Parameter Transaction)" by selecting the "Skip Initial Screen".

Thanks & Regards,

Vamsi.

Read only

Former Member
0 Likes
2,353

hi,

Try creating a parameter transaction. Be sure to select 'Skip first screen'. And fill in the defaults for the selection screen.

hope this helps

Regards

Ritesh

Read only

Former Member
0 Likes
2,354

Hi,

try this logic it works.

declare a selection screen with number

SELECTION-SCREEN BEGIN OF SCREEN 100.

parameter p_matnr type matnr.

SELECTION-SCREEN END OF SCREEN 100.

if sy-uname ne 'CHACX074'.

call the selection screen only if the particular user needs screen.

call screen 100.

else.

p_matnr = '100'.

endif.

write : p_matnr.

When you are creating TCODE dont specify the Selection screen . as its determine by the program.

by this you can use single TCODE.

Regards,

Shanmugavel Chandrasekaran

Edited by: shanmugavel chandrasekaran on Mar 10, 2010 6:37 AM

Read only

0 Likes
2,353

Hi , <li>Call selection-screen like below not possible with CALL SCREEN

CALL SELECTION-SCREEN '0500'.
Thanks Venkat.O

Read only

0 Likes
2,353

Hi Venkat,

Can you give the sample code for CALL SELECTION-SCREEN '1OOO'

Regards,

Vikram Sukumar

Read only

0 Likes
2,353

Hi Sukumar, <li>Try this way.


REPORT ztest_notepad.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title
                                     AS WINDOW.
PARAMETERS name TYPE sy-uname.
SELECTION-SCREEN END OF SCREEN 500.

title = 'Input name'.
START-OF-SELECTION.
IF sy-uname NE 'VENKAT'.
   "Sy-uname IN r_name(r_name to give multiple values)
  CALL SELECTION-SCREEN '0500'." STARTING AT 1 1 ENDING AT 1000 1000.
ENDIF.
Thanks Venkat.O

Read only

0 Likes
2,353

Hi Venkat,

Thanks Mate, it was really good idea .

Regards,

Vikram Sukumar

Read only

0 Likes
2,353
IF sy-uname NE 'VENKAT'.

No, it's a really stupid idea to hardcode user names, violates any basic development standard and was already mentioned.

@ Venkat: I have removed many of your link-farm answers to basic questions from the forums this morning. THere are a total of 41 Abuse Reports against your name for violating forum rules. Next time is the last time and sy-uname will be 'GUEST' if I have to do it again.

Cheers,

Julius

Read only

0 Likes
2,353

Hi Julius Bussche,

Even though the hardcoding part is bad i got an idea for my requirement from his logic so i am giving points.

Regards,

Vikram Sukumar

Read only

Former Member
0 Likes
2,353

Hi Vikram,

Try the below code, it will work. I checked.

  • Selection Screen

SELECTION-SCREEN BEGIN OF SCREEN 123.

SELECTION-SCREEN BEGIN OF BLOCK new WITH FRAME TITLE text-100.

PARAMETERS a TYPE i.

SELECTION-SCREEN END OF BLOCK new.

SELECTION-SCREEN END OF SCREEN 123.

  • Logic to disply the ALV for specified user.

IF sy-uname = 'SAPUSER' or sy-uname = 'SAPUSER1'.

PERFORM display_alv. "Define the code for ALV display.

ELSE.

CALL SELECTION-SCREEN 123.

ENDIF.

Ganesh

Read only

Former Member
0 Likes
2,353

Thanks Guys for taking time for replying for the thread.

Read only

Former Member
0 Likes
2,353

HI TRY THIS CODE.



  SUBMIT <PROGRAM NAME> AND RETURN
  SELECTION PARAMETAR1
  SELECTION PARAMETAR2
  SELECTION PARAMETER3
  WITH < CONDITIONS>.

and another method is, create a Tcode for a screen and write following code.


CALL TRANSACTION 'XYZ' AND SKIP FIRST SCREEN.

Regards,

Abhilash