Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

records into internal table

Former Member
0 Kudos

hi,

i have a field in selection screen called p_count

and i and getting records from marc table and downloading it to presentation server.p_count is having a default value 100(p_count is used to select no of records)

if i give p_count as 100 will get 100 records from marc after all condition check. but usually there will be only 40 records which satisfy all the condition in select query

so even if i give 100 will get only 40 records .now the problem is if i give p_count as 20 i want only 20 records even if 40 records are there.how can we delete excess record ie out of 40 records which satisfy the condition i only need 20 which i am giving in p_count.in some condition p_count can vary to any number.

please give a solution.

thanks,

gopan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

WHen you select the data from MARC use the UP TO n ROWS addition..

EX.

SELECT * FROM MARC UP TO P_COUNT ROWS

INTO TABLE T_MARC.

Thanks,

Naren

1 REPLY 1

Former Member
0 Kudos

Hi,

WHen you select the data from MARC use the UP TO n ROWS addition..

EX.

SELECT * FROM MARC UP TO P_COUNT ROWS

INTO TABLE T_MARC.

Thanks,

Naren