2008 Feb 21 6:54 AM
Can anybody tell me what the system variable for internal table count?
I just wants to know how many recoreds are there in my internal table ?
Regards,
pandu.
Can anybody tell me what the system variable for internal table count?
I just wants to know how many recoreds are there in my internal table ?
Regards,
pandu.
2008 Feb 21 6:55 AM
2008 Feb 21 6:55 AM
HI
sy-tabix.
or use describe table.
DESCRIBE TABLE it_vendor LINES v_totalrec.
Edited by: Jyothsna M on Feb 21, 2008 7:55 AM
2008 Feb 21 6:56 AM
use DESCRIBE statemenmt
DESCRIBE TABLE itab LINES n.
here, n will give the numbmer of records in theinternal table itab.
Regards.
2008 Feb 21 6:56 AM
SY-TABIX
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 4:53 PM
2008 Feb 21 6:57 AM
Check sy-dbcnt .
or use
data :lv_no type i .
Desrcribe table itab lines lv_no .
Regards,
Vijay
2008 Feb 21 7:01 AM
Hi ,
DESCRIBE TABLE <itab> [LINES <l>] [OCCURS <n>] [KIND <k>].
If you use the LINES parameter, the number of filled lines is written to the variable <lin>. If parameter, the you use the OCCURS value of the INITIAL SIZE of the table is returned to the variable <n>. If you use the KIND parameter, the table type is returned to the variable <k>: T for standard table, S for sorted table, and H for hashed table.
using variable
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3798358411d1829f0000e829fbfe/content.htm
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 4:53 PM
2008 Feb 21 9:09 AM
Thanks to all,
But dint get the solution. my problem is , i have in internal table and in that i have data . i have created one more fields in the same internal table , and i have to return total no of records to that field...
Anybody help me pls..
Regards,
pandu.
2008 Feb 21 6:57 AM
2008 Feb 21 6:59 AM
I
Hi,
SY-TABIX
Current line of an internal table. It is set only for index tables. The field is either not set or is set to 0 for hashed tables. It iset by ABAP commands APPEND,COLLECT,LOOP AT,READ TABLE,SAERCH itab FOR .
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
Database Access
SY-DBCNT
It contains the number of table entries processed. In an loop it is not set until after the ENDSELECT or ENDEXEC statement. It is set by ABAP
Regards.
2008 Feb 21 9:14 AM
To find out the attributes of an internal table at runtime that were not available statically, use the statement:
DESCRIBE TABLE <itab> [LINES <l>] [OCCURS <n>] [KIND <k>].
If you use the LINES parameter, the number of filled lines is written to the variable <lin>. If you use the OCCURS parameter, the value of the INITIAL SIZE of the table is returned to the variable <n>. If you use the KIND parameter, the table type is returned to the variable <k>: T for standard table, S for sorted table, and H for hashed table
DATA RECS TYPE I.
DESCRIBE TABLE <ITAB> LINES RECS.
2008 Feb 21 9:45 AM
Thank u for ur reply.
This is iam working for BAPI, i got that no. of records while debugging, but iam iam not gettimg in the out put.
How to do that ?
actually i have written the query like this....
select matnr
werks
maabc form marc into table itab where mabbc <> ' '.
describe table itab lines itba-tot_num_rec.
can pls tell me y iam not getting the value in bapi output?
Regards,
pandu
2008 Feb 21 10:17 AM
Hi,
not sure whether this solves the problem or not.
create a new variable for the number of lines and assign it to the field in itab.
pls make sure that you are APPENDing the data.
regards,
teja.
2008 Feb 21 9:48 AM
Hi,
use this staement for getting total number of records.
DESCRIBE TABLE itab LINES v_lines.
best regrds
Satya
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |