Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Retreive data from wa structure into fields.

Former Member
0 Likes
700

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
677

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.

5 REPLIES 5
Read only

abdulazeez12
Active Contributor
0 Likes
677

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'.

Read only

Former Member
0 Likes
678

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

Read only

0 Likes
677

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.

Read only

Former Member
0 Likes
677

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

Read only

Former Member
0 Likes
677

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.