‎2007 May 22 5:24 AM
hi guru
please tell me about selection screen validation
regards.
subhasis
‎2007 May 22 5:28 AM
Hi Subhasis,
Selection Screen is validated at the event
AT SELECTION SCREEN.
In this event you check the input parameters with the values in DB and if they are not matching you can give an error message to the error of the same.
Reward points if useful.
Regards,
Atish
‎2007 May 22 5:28 AM
Hi Subhasis,
Selection Screen is validated at the event
AT SELECTION SCREEN.
In this event you check the input parameters with the values in DB and if they are not matching you can give an error message to the error of the same.
Reward points if useful.
Regards,
Atish
‎2007 May 22 5:30 AM
Hi,
Based on the input parameter validations can be takes place. Let us take some example u take company code on ur selection screen, then user should enter that company code then instead of using obligatory u can do some validataion like
IF P_BUKRS IS INITIAL.
MESSAGE E001(ZFE) WITH 'PLEASE ENTER COMPANY CODE'.
LEAVE TO SCREEN 1000.
ENDIF.
this is the validation.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar
‎2007 May 22 5:33 AM
there are diffrent validation,
if you want to get f4 value
then you need to write :
at selection-screen on value-request for p_file.
if you want to validate selection-screen values..
at selection-screen on p_matnr.
if you want to get dynamic validation like set up password,invisible,disable..
use at selection-screen output.
loop at screen.
endloop.
‎2007 May 22 5:33 AM
hi,
Chk this sample progra. here we are checking the check box is ticked or not.
report zchk.tables: sscrfields.
PARAMETERS: p_hold AS CHECKBOX DEFAULT 'X' USER-COMMAND hold.
at selection-screen.
PERFORM sscr_user_commands.
*---------------------------------------------------------------------*
* FORM sscr_user_commands *
*---------------------------------------------------------------------*
FORM sscr_user_commands.
CASE sscrfields-ucomm.
WHEN 'HOLD'. " Make this uppercase.
break-point.
ENDCASE.
ENDFORM.Regards
Reshma
‎2007 May 22 5:44 AM
hi,
If you need to validata a material number s_matnr.. which is your sel;ect option in selection screen,,
then
<b>At selection-screen on s_matnr.</b>
data lv_matnr type matnr.
select single matnr from mara
into lv_matnr
where matnr in s_matnr.
since matnr is the only primary key in mara we are using select single..
*if for some other field which is a part of primary key in that table then use select upto 1 rows..
is sy-subrc <> 0.
Message i001."enter valid material number..
endif.
<b>At selection-screen on s_matnr.</b> , if you use this and if error occured for invalid material number then all the other parametersa in selection screen will be disabled point to only s_matnr enable in your selection screen..
if you use just At selection-screen then the cursor will not point to matnr but only to the first parameter in the selection screen..
hope you understood
rewards if useful,
regards,
nazeer.
‎2007 May 22 5:46 AM
at selection-scren is basically used to check the input s in the selection screen via a logic, if the inputs are not according to that logic we will raise an error message through which the system will take back the user to the selection screen.
there are some more at selection-screen
like
At selection-screen on field - If ilogic is related to only a particular field
at selection-screen on value help - for writing F4 logic
at selection-screen on help - for writing F1
etc.,
go through the below underlined programs
Selection Screen Events - <u>demo_selection_screen_events</u>
PBO of selection Screen - <u>demo_at_selection_screen_pbo</u>
Hope this will solve ur problem..
<b><u>Dont forget to reward all the useful replies</u></b>
Sudheer
‎2007 May 22 6:20 AM
hi subhasis,
these two events can help you for the selection screen validations
at slection-screen on field,
and at slection-screen .
regards,
seshu.
‎2007 May 22 4:04 PM
hi,
selection-screen validation is nothing but getting the proper values as input at selction screen level.means checking the values which you are passing at selection screen values.
for this u can use AT SELECTION-SCREEN.
suppose u need u validate MATNR on u r selection screen.in this case we can validate the MATNR is there in the table MVKE or not.
u can write like
select-options: s_matnr for mvke-matnr.
at selection-screen.
data : v_matnr type mvke-matnr.
select single matnr
from mvke
into v_matnr
where matnr in s_matnr.
if sy-subrc ne 0.
message e001.
else.
clear v_matnr.
endif.
reward if it is useful.
Thanks,
Madhukar.