‎2007 Mar 26 7:53 PM
i have a selection screen field PO, where in when i give any po numner.it should accept when that po exist or else should throw some error
‎2007 Mar 26 7:55 PM
‎2007 Mar 26 8:29 PM
Hi Tara,
WelCome to the this FORUMS...
Its simple as Raymond says.
In addition to that:
AT SELECTION-SCREEN on <b>s_po</b>. " (PO field defined on screen)
select.....
if sy-subrc <> 0.
error mssg.
endif.
This event (AT SELECTION-SCREEN on <b>s_po</b>. )is assigned to the selection screen fields corresponding to the report parameter or selection criterion s_po.
If the report starts an error dialog at this point, precisely these fields become ready for input.
‎2007 Mar 26 8:39 PM
Hi Tara,
You can the selection screen validations through either AT SELECTION-SCREEN or AT SELECTION-SCREEN ON <FIELD> eveent.
Check with this code.
PARAMETERS: P_EBELN TYPE EKKO-EBELN.
AT SELECTION-SCREEN ON P_EBELN.
DATA V_EBELN TYPE EKKO-EBELN.
SELECT SINGLE EBELN
FROM EKKO
INTO V_EBELN
WHERE EBELN = P_EBELN.
IF V_EBELN IS INITIAL.
MESSAGE E000(ZI) 'No PO exists with this number, Plz try again'.
ENDIF.Thanks,
Vinay