2015 Jan 19 12:15 PM
Hi,
i want to finish a Report for Special conditions before the selection Screen starts.
I try it in this way:
Has anyone a better idea? In my case i get the message but i Background ein see the empty selection-Screen.
Regards, Dieter
2015 Jan 19 12:23 PM
Hi Dieter,
In case you want to restrict the report usage based on the user, you can go with authority check on the T-code rather than the message.
example :
gv_tcode = 'ZTEST' " Ur transaction code
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD gv_tcode.
IF sy-subrc NE 0.
MESSAGE text-002 TYPE gc_e.
ENDIF.
Thanks
Suvarna!!
2015 Jan 19 12:23 PM
Hi Dieter,
In case you want to restrict the report usage based on the user, you can go with authority check on the T-code rather than the message.
example :
gv_tcode = 'ZTEST' " Ur transaction code
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD gv_tcode.
IF sy-subrc NE 0.
MESSAGE text-002 TYPE gc_e.
ENDIF.
Thanks
Suvarna!!
2015 Jan 19 12:49 PM
Hi,
thanks for your answer,
thats not really what in mean. It's not relevant how to check if a user has the authority.
I know there are several ways.
As i have mentioned i don't want to show the empty selection screen. I only want to show
a message and finished the Report.
I there another way as i have shown in INITIALIZATION?
Regards, Dieter
2015 Jan 19 1:01 PM
Hi Dieter,
why you don't create different selection screens.
At Start - Selection you check if the user should see the screen.
True: Show the normal screen
False: Show only a text label with some text like "you're not allowed to use this report".
Regards
Marcel
2015 Jan 19 1:32 PM
Hi Dieter
IF condition
STOP.
"or RETURN
"or LEAVE TO SCREEN 0.
ENDIF.
regards,
Archer
2015 Jan 19 1:52 PM
Hi,
thanks for the idea.
i do it with message I010 ..... . After this i set LEAVE PROGRAM
Regards, Dieter
2015 Jan 19 2:36 PM
Hi Dieter,
i think you're looking for event load-of-program instead of initialization.
Insert your initial message there and all will be fine.
Best regards - Jörg
2015 Jan 19 4:14 PM
If no message dialog to be displayed then
simply
INITIALIZATION.
if condition
MESSAGE 'MESSAGE TEXT' TYPE 'I'.
LEAVE PROGRAM.
End if.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |