2023 Mar 30 7:50 AM
I have an input field as date range, In that input field, If I give incorrect date or data not found on the date means, It should throw an error called ' Data not found', It is coming but Error was showing in the next page, It is not showing on the selection screen itself.
The error message should come in the selection screen itself.
Please do needful.
Thanks.
2023 Mar 30 9:27 AM
How about sharing the relevant code. Use the CODE button in the editor to nicely format it.
2023 Mar 31 1:49 PM
Execute the checks and first selection of data in some AT SELECTION-SCREEN event and not in the START-OF-SELECTION block. For performance only execute some tests when user click on execution
AT SELECTION-SCREEN ON SO_DATE.
IF SSCRFIELDS-UCOMM EQ 'ONLI' " only process when execution
OR SSCRFIELDS-UCOMM EQ 'PRIN'. " required, not when ENTER
SELECT * FROM SOMETABLE INTO TABLE SOMEITAB
WHERE DATE IN SO_DATE.
IF SY-SUBRC NE 0.
MESSAGE 'Data not found' TYPE 'E'.
ENDIF.
ENDIF.
2023 Mar 31 1:49 PM
Additionally to Matthew's comment, let us know in case you are referring to any document for this.