‎2009 May 25 3:06 PM
Hi all,
My query is that i have to select the data from the database table .But the fields to be selected from that database table is decided from the Ztable ( this Ztable contains the field name ).
How can this be achieved ??
‎2009 May 25 3:13 PM
Hi,
use the below logic for this.
types: ty_fields type fieldname.
data: it_fields type table of ty_fields.
select fieldname from ztable into table it_fields where ... " Get the fieldnames into it_fields
select (it_fields) from dbtable into table it_tab where ... " Use table it_fields for list of fields to be fetchedhope this helps you.
Regards,
Manoj Kumar P
‎2009 May 25 3:12 PM
hi
select * from ztable into table twhere_clause.
...
select * from ...
where ( twhere_clause ).
...
regards,darek
‎2009 May 25 3:13 PM
Hi,
use the below logic for this.
types: ty_fields type fieldname.
data: it_fields type table of ty_fields.
select fieldname from ztable into table it_fields where ... " Get the fieldnames into it_fields
select (it_fields) from dbtable into table it_tab where ... " Use table it_fields for list of fields to be fetchedhope this helps you.
Regards,
Manoj Kumar P
‎2009 May 25 3:13 PM
‎2009 May 25 3:14 PM
follow the method mentined below:
Step1:
Run transaction SE16 & put table name as selection criteria.
Step2:
Choose the fields which will be the selection criteria for data selection from settings > Fields for selection
Put the selection criteria:
Step3:
Report will be displayed in the following format:
Choose the desired output fields from Settings > Format list > Choose Fields.
The final report will be displayed:
Step4:
Number of entries in the table can also be checked using SE16 Transaction.
Step5:
Whether the data selection is done using primary / secondary index can also be checked using transaction SE11 / ST05.
‎2009 May 25 3:18 PM
you may goto the following link:
http://help.sap.com/saphelp_nw04/helpdata/EN/67/93b80914a911d2953c0000e8353423/content.htm
regards,
prinan
‎2009 May 25 4:08 PM