02-11-2008 5:48 AM
Hi Gurus,
In the internal table has 1 records, but only few fields are pouplated, While DESCRIBE statement its not showing the number of records, its a upgrade project from 4.6c to ECC 6.0
data: var type sy-tfill.
describe table table-name lines var.
if var gt 0.
......
reward asured.
with regards
Thambee.
02-11-2008 6:10 AM
Hi Thambe Durai,
I thing you did not append that record.
See this example code
data:
begin of itab occurs 10,
num type i,
name(20),
end of itab.
data num type i.
itab-name = 'Mahi'.
append itab.
describe table itab lines num.
write num.
Plzz reward if it is useful,
Mahi.
02-11-2008 6:10 AM
Hi Thambe Durai,
I thing you did not append that record.
See this example code
data:
begin of itab occurs 10,
num type i,
name(20),
end of itab.
data num type i.
itab-name = 'Mahi'.
append itab.
describe table itab lines num.
write num.
Plzz reward if it is useful,
Mahi.
02-11-2008 6:17 AM
Hi,
Can you give the code, so that we might suggest some thing on that...
Regards,
Ramesh
02-11-2008 6:21 AM
hi Durai..
while there is only one record populated to an internal table via select statement it would be available only in a workarea. so the DESCRIBE stmt is not calculating the no. of records.
so try to append it to the body.
Try like this sample code..,
data: var type sy-tfill.
DATA: ITAB LIKE ZDB_EMP OCCURS 0 WITH HEADER LINE.
SELECT * FROM ZDB_EMP INTO ITAB WHERE EMPID = '111'.
ENDSELECT.
APPEND ITAB. " put this append stmt
describe table ITAB lines var.
if var gt 0.
WRITE: / VAR.
ENDIF.
Regards,
K.Tharani.