2006 Jun 09 9:53 PM
Hi all,
How to count the records available for specific select-option in the internal table..
e.g: select ebeln bukrs lfa1 from ekpo into table it1 where ebeln in so_ebeln.
loop at it1.
ekpo-ebeln,
ekpo-bukrs,
ekpo-lfa1,
endloop.
In the o/p i want the data and a variable which holds no. of records present...
2006 Jun 09 9:55 PM
<b>SY-DBCNT</b> ( DB operations, number of table lines processed) from db tables after every Iteration and for internal table <b>Sy-tabix</b> ..
OR
You can write
DATA: LN TYPE i.
Describe table itab lines LN..
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
yes you can give..no issues...
Cheers,
Abdul
Please close the thread if ur question has been answered..
2006 Jun 09 9:55 PM
Once you get all the records into an internal table, use the following statement.
DATA: v_record_count TYPE i.
DESCRIBE TABLE itab LINES v_record_count.
2006 Jun 09 9:55 PM
<b>SY-DBCNT</b> ( DB operations, number of table lines processed) from db tables after every Iteration and for internal table <b>Sy-tabix</b> ..
OR
You can write
DATA: LN TYPE i.
Describe table itab lines LN..
Hope thisll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"
2006 Jun 09 10:02 PM
Hi all,
Can't we give the variable as character(C) because i want to concatenate after it..
because concatenate won't allow integer(i) variable...u know that..
2006 Jun 09 10:04 PM
yes you can give..no issues...
Cheers,
Abdul
Please close the thread if ur question has been answered..
2006 Jun 09 10:07 PM
Hi
Move it to char variable
DATA DBCNT_C(5) TYPE C.
SELECT * FROM ....
MOVE SY-DBCNT TO DBCNT_C.
Max
2006 Jun 09 9:57 PM
Hi
After loading the record in the internal table, you read the variable SY-DBCNT, here you can see the number of records you've loaded.
select ebeln bukrs lfa1 from ekpo into table it1 where ebeln in so_ebeln
n_record = sy-dbcnt.
Max
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |