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

Finish REPORT before selection-screen

Former Member
0 Likes
1,344

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,301

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!!

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,302

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!!

Read only

0 Likes
1,301

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

Read only

Former Member
0 Likes
1,301

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

Read only

Former Member
0 Likes
1,301

Hi Dieter

  IF condition

     STOP. 

     "or RETURN

    "or LEAVE TO SCREEN 0.

  ENDIF.


regards,

Archer

Read only

0 Likes
1,301

Hi,

thanks for the idea.

i do it with message I010 .....  . After this i set LEAVE PROGRAM


Regards, Dieter

Read only

jrg_wulf
Active Contributor
0 Likes
1,301

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

Read only

Former Member
0 Likes
1,301

If no message dialog to be displayed then

simply

INITIALIZATION.

if condition

   MESSAGE 'MESSAGE TEXT' TYPE 'I'.

   LEAVE PROGRAM.

End if.