‎2008 Jul 14 9:34 AM
hi experts
i want to do query on table vbak and what i want to know is only if i get in result more than one row
thanks
Amit
‎2008 Jul 14 9:37 AM
select from vbak and fill the internal table as t_vbak.
DATA: N TYPE I.
DESCRIBE TABLE t_vbak LINES N.
N will get the number of rows selected.
hope this helps
Cheers
Kothand
‎2008 Jul 14 9:37 AM
‎2008 Jul 14 9:37 AM
fectch the entries into an internal table and then use..
DESCRIBE TABLE ITAB LINES wf_lines.
WF_LINES WILL CONTAIN THE NUMBER OF ROWS THAT THE TABLE IS HAVING...
WF_LINES IS INTEGER VARIABLE..
‎2008 Jul 14 9:38 AM
hi,
Get the data in an internal table say itab_vbak.
now use the Describe statement to chek how many records has been selected.
data : w_lines type i.
Describe table itab_vbak line w_lines.
Hope this helps!!
Regards,
Lalit
‎2008 Jul 14 9:38 AM
hi
Well you ccan check a condition by using System field SY-DBCNT because in this field it will have how many database rows are executed succesfully.
If SY-DBCNT >1
ENDIF.
I hope this helps you
Regards
Pavan
‎2008 Jul 14 9:39 AM
Hi Amit,
Your Question is not clear.
Do you want to Nmber of records you got(OR) How to get more than one record.
If you want to know number of records you got you can use
DESCRIBE Statement on Internal table.
(OR)
You wnat to get more than one row , you can select all records into Internal table, Like
Select *
from VBAK
INTO TABLE t_vbak
Here t_vbak is of structure VBAK.