‎2006 Sep 26 6:37 AM
hi frens,
In my selection screen i have three fields and i have to validate..i tried using at selection screen can u pls suggest how to do that..by giving an example...the main problem is i shld check with iniial and if the entry does not exists it has to dispaly message like no data maintained ....i tried but its not working.
its very urgent.
thanks in advance,
malathi
‎2006 Sep 26 6:40 AM
you can do the checking in at selection-screen output
at selection-screen output.
if not <field1 is initial.
*Do your validation here
if sy-subrc ne 0.
*throw error message
endif.
endif.
‎2006 Sep 26 6:44 AM
Hi,
E.g. if your field is say pa_vbeln & if it is initial you have to display error, then code as follows,
AT SELECTION-SCREEN ON pa_vbeln.
IF pa_vbeln IS INITIAL.
MESSAGE E000.
ENDIF.
similarly for the remaining fields .
Regards,
Raghavendra
‎2006 Sep 26 6:49 AM
Hi,
Post u'r code.
You can do validtion in the event At selection-screen or AT SLELECTION-SCREEN ON FIELDNAME.
if field is initial.
issue message.
else.
check the existence of data in database tables.
if sy-subrc <> 0.
issue error message.
endif.
enidf.
Regards,
Arun
‎2006 Sep 26 6:55 AM
hi malathi,
AT SELECTION-SCREEN.
IF NOT S_MATNR IS INITIAL.
SELECT SINGLE MATNR FROM MARA
INTO V_MATNR
WHERE MATNR IN S_MATNR.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ2).
ENDIF.
ELSE.
MESSAGE E000(ZZ2).
ENDIF.
hope this helps,
do reward if it helps,
priya.
‎2006 Sep 26 10:35 AM
hi mani,
AT SELECTION-SCREEN ON p_vbeln.
IF not p_vbeln IS INITIAL.
"write the validation code here
ELSE.
MESSAGE E000.
ENDIF
AT SELECTION-SCREEN ON p_vbelp.
IF not p_vbelp IS INITIAL.
"write the validation code here
else.
MESSAGE E000.
ENDIF
Regards,
Richa.