2010 Mar 10 5:05 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
2010 Mar 10 5:32 AM
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,
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
2010 Mar 10 5:09 AM
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
a®
2010 Mar 10 5:12 AM
Hi a®s ,
Thanks, that was helpful but i need to achieve this in single program.
Regards,
Vikram Sukumar
2010 Mar 10 5:22 AM
in load or program LOAD-OF-PROGRAM or initialization event check sy-user and handle it...Hope it helps
2010 Mar 10 5:13 AM
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.
2010 Mar 10 5:30 AM
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
2010 Mar 10 5:32 AM
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
2010 Mar 10 5:53 AM
Hi ,
<li>Call selection-screen like below not possible with CALL SCREEN
Thanks
Venkat.OCALL SELECTION-SCREEN '0500'.
2010 Mar 10 6:35 AM
Hi Venkat,
Can you give the sample code for CALL SELECTION-SCREEN '1OOO'
Regards,
Vikram Sukumar
2010 Mar 10 7:32 AM
Hi Sukumar,
<li>Try this way.
Thanks
Venkat.O
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.
2010 Mar 10 7:44 AM
Hi Venkat,
Thanks Mate, it was really good idea .
Regards,
Vikram Sukumar
2010 Mar 13 8:25 AM
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
2010 Mar 15 11:11 AM
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
2010 Mar 10 5:56 AM
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
2010 Mar 10 7:45 AM
2010 Mar 13 9:53 AM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |