2007 Dec 18 5:07 PM
I have passed a parameter p_count at selection screen
parameters : p_count type i,
select
matnr
from mara
into table t_mara
up to p_count
while executing when i give a number at selection screen it is fetching the records depending the entries in the database table.... but if the database entries are 10000 records and the user enters 10,001 it should show an error message and also if any new data is added in the data base record it should fetch that record as well
how can i solve the above query plz help
2007 Dec 18 5:50 PM
You can use the COUNT( * ) to know about total number of entries.
AT SELECTION-SCREEN ON P_COUNT.
SELECT COUNT( * ) INTO L_COUNT FROM MARA.
IF L_COUNT > P_COUNT.
* ERROR MESSAGE
ENDIF.
Regards,
Naimesh Patel
2007 Dec 18 5:50 PM
You can use the COUNT( * ) to know about total number of entries.
AT SELECTION-SCREEN ON P_COUNT.
SELECT COUNT( * ) INTO L_COUNT FROM MARA.
IF L_COUNT > P_COUNT.
* ERROR MESSAGE
ENDIF.
Regards,
Naimesh Patel
2007 Dec 19 4:41 PM
well i had to do to little bit of research .. but thanks for the reply which gave me an idea