‎2007 Aug 16 5:35 AM
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.
‎2007 Aug 16 8:19 AM
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
‎2007 Aug 16 8:40 AM
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.
‎2007 Aug 16 8:41 AM
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
‎2007 Aug 16 8:48 AM
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.