2007 Sep 24 8:58 AM
Hi friends,
I am having a query regarding classical report.I want to retreive data for vendor billwise realisation report.I am getting few fields into my list screen(fields from bsis table).Remaining fields i want to retreive from table bseg(augdt,augbl....)with the condition that the belnr of both the tables should be same and Account type = 'k'(vendors).
I tried it using select queries for the bsis and bseg..but data is retreived only from one table bsis and not from bseg.so for data from bseg i used workarea(wa).data is retreived for only single doc no. and not for other documents.
If any problem in understanding this pls give me the mail id i will send in detail.
Thanks and regards,
Anand.
2007 Sep 24 9:03 AM
Hi Anand,
You should not use Workarea, if you are exepecting N number of records. Please use internal table.
SELECT * FROM BSIS
into table i_bsis
where ....
if not i_bsis[] is initial.
sort i_bsis by belnr.
SELECT * FROM BSEG
into table i_bseg
for all entries in i_bsis
where belnr = i_bsis-belnr.
endif.
Best regards,
Prashant
Hi friends,
I am having a query regarding classical report.I want to retreive data for vendor billwise realisation report.I am getting few fields into my list screen(fields from bsis table).Remaining fields i want to retreive from table bseg(augdt,augbl....)with the condition that the belnr of both the tables should be same and Account type = 'k'(vendors).
I tried it using select queries for the bsis and bseg..but data is retreived only from one table bsis and not from bseg.so for data from bseg i used workarea(wa).data is retreived for only single doc no. and not for other documents.
If any problem in understanding this pls give me the mail id i will send in detail.
Thanks and regards,
Anand.
2007 Sep 24 9:01 AM
After fetching from BSIS into internal table, say it_bsis, use
select <fields> from BSEG into table it_bseg for all entries in it_bsis
where BELNR eq it_bsis-BELNR and
account type = 'K'.
2007 Sep 24 9:03 AM
Hi Anand,
You should not use Workarea, if you are exepecting N number of records. Please use internal table.
SELECT * FROM BSIS
into table i_bsis
where ....
if not i_bsis[] is initial.
sort i_bsis by belnr.
SELECT * FROM BSEG
into table i_bseg
for all entries in i_bsis
where belnr = i_bsis-belnr.
endif.
Best regards,
Prashant
2007 Sep 25 6:04 AM
Hiii friend,
I hope ur answer is helpful to me and send me ur mail id so that i will send u my report which is of 2 select statements......
Thanks & regards,
Anand.
2007 Sep 24 9:04 AM
Bseg table is a cluster table U cannot join with other tables.
Remove join Bseg with other tables and use select single from bseg
Sreeram
2007 Sep 24 9:04 AM
If u have stored datas retrieved from one table in an internal table, then use
<b>Select for all entries</b>
If u have not stored that in an internal table, then use
<b>Inner join Select query</b>
Please reward if helpful.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |