Hi Hemant,
Since you're validating the Service Order Number entred by user across the EBELN value of EKKO table. Follow below steps:
* Check does the service order nuber entered by user is present in EKKO table using
SELECT SINGLE EBELN statement.
* If the service order number is not present in the EKKO table, give Error message.
Code:
DATA: l_ebeln TYPE EKKO-EBELN.
if wa_data-sn1 IS NOT INITIAL.
SELECT SINGLE ebeln from ekko into l_ebeln WHERE ebeln EQ wa_data-sn1.
IF sy-subrc NE 0.
MESSAGE 'Enter Correct Serivce Order Number' TYPE 'E'.
ENDIF.
ENDIF.
Thanks & Regards,
Venugopal M N