Hi all,
I want to get the number of records in an internal table with a particular value for a field. Can it be done by using the describe statement? Can anyone help me to solve this problem.I dont want to use loops to do the same
Hello,
Define a temporary Internal table which is similar to the one which holds the data.
G_T_ITAB_TMP[] = G_T_ITAB[].
Delete G_T_ITAB_TMP where <Field> <> <value>
describe table G_T_ITAB_TMP lines....
Hope this helps you.
Regds, Murugesh AS
Hello Dominic,
If you are very particular about not using the LOOPs, then the approach suggested by Murugesh seem to me to be the only option.
But then, let us say you want to find out how many times each different value occurs for a particular field in an internal table, then the best option is to use a loop.
Regards,
Anand Mandalika.
Add a comment