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

popup

Former Member
0 Likes
800

when item availability icon in va01/va02 is clicked only authorised users should be

able to proceed to the next screen.Non-authorised users should get a pop up to display the error msg with only

1 button ok and with msg not authorised and should remain in the same screen,should not allow to continue

how do i code the popup and how do i code for the screen not to proceed and remain there itself.

4 REPLIES 4
Read only

Former Member
0 Likes
777

Hello,

first : you need to code for authorisation check by creating an authorisation object or as instructed by your functional consultant

next.....

to call the pop up,you can use standard function module 'POP_UP_TO_CONFIRM' and disable the buttons except one...then in this case the sy-ucomm(sy-ucomm = PORE for availability checking i guess) or the corresponding variable it is passed into must be cleared so that the screen is not left and/or you can try set screen 0....

Reason : The next screen is automatically called when the system finishes the PAI processing of the current screen. If the screen number of the next screen is 0, the current next screen is ended.

It is best to give an error message rather than a pop up because you are performing the same option of providing an error message on a pop up with only OK button but again the variable for sy-ucomm needs to be cleared before the error message

Since i am unaware as how you plan to proceed,i.e exits,BADIs,enhancement options the extend to which the suggestion is applicable is limited

for eg:you cannot do a call screen iside object oriented code of a BADI as far i know

Hope the suggestions were useful

Regards

Byju

just to add-in

Pls try exit_sapfv45k_001 under include Zxvvau03 for icon check item availability/func code 'Pore' ...where you can do an authorisation check/call the pop up and clearing the sy-ucomm code....

Message was edited by:

Byju Edamana

Read only

0 Likes
777

Thank u so much ..but i m not able to use set screen ..it gives error msg...set screen not allowed.

And if

call function 'POPUP_TO_CONFIRM'

exporting

titlebar = 'Confirm'

text_question = 'Not allowed'

text_button_1 = 'YES'

icon_button_1 = 'ICON_OKAY'

text_button_2 = 'Cancel'

icon_button_2 = 'ICON_CANCEL'

default_button = '2'

display_cancel_button = ''

importing

answer = returncode.

Here,in this code wht change shd i make to have only 1 button yes.

Read only

Former Member
0 Likes
777

Is the checking level like authority-check or field level checking ,

then write a function module exit whether the user is authority check or not and active it

if the user press the button

Read only

0 Likes
777

Thank u for ur reply.

Its authority level check and also im writing the code in a FM Exit but when i directly give the error msg type E,the screen gets freezed so i do not want the screen to get freezed and also not proceed to the next level on the click of the button.so im giving a pop-up and want to b in the same screen without proceeding.