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

ALV Report

Former Member
0 Likes
657

Hi all,

I have a scenario where I have got three tables two std ones and the third one is the custom one bseg,bkpf and ztest, and based on three fields i.e. belnr, blart and bukrs( which is in all the three tables )to join these tables and need to retreive the following the data from each table:

From BSEG - - -> saknr,kostl

From BKPF- - - - > blart,bldat

and

From Ztest -


> co_num, co_name

Now the problem is that at the selection parameters there is no field mandatory for the user to enter,

I mean a user can just enter the start date and end date to display the report b/w that period or he can just enter the name of a particular customer to view the report, or he can just enter the account number of a particlular customer and may also enter just fiscal year to have a look at the report!!!

Can anyone of you please tell me how to achieve this.

Thanks,

Rajeev !!!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
626

Hi Rajeev,

if all the three fields are common in three tables bkpf , bseg and custom , then you can write single select statements using inner join statements for the tables using the select-options

if customer number not entered.

select requried fields from bkpf and bseg using inner join where the saknr = select option

date = select-option

fiscal year = select option.

then using all entries get the entries from custom table equating the common fields.

if customer number is entered then the reverse the above procedure.

with regards

brijesh

Hi all,

I have a scenario where I have got three tables two std ones and the third one is the custom one bseg,bkpf and ztest, and based on three fields i.e. belnr, blart and bukrs( which is in all the three tables )to join these tables and need to retreive the following the data from each table:

From BSEG - - -> saknr,kostl

From BKPF- - - - > blart,bldat

and

From Ztest -


> co_num, co_name

Now the problem is that at the selection parameters there is no field mandatory for the user to enter,

I mean a user can just enter the start date and end date to display the report b/w that period or he can just enter the name of a particular customer to view the report, or he can just enter the account number of a particlular customer and may also enter just fiscal year to have a look at the report!!!

Can anyone of you please tell me how to achieve this.

Thanks,

Rajeev !!!!

3 REPLIES 3
Read only

Former Member
0 Likes
626

Try using the standard index tables of BSEG. They are indexed by a few criteria.

Cleared items:

BSAD Accounting: Secondary Index for Customers (Cleared Items)

BSAK Accounting: Secondary Index for Vendors (Cleared Items)

BSAS Accounting: Secondary Index for G/L Accounts (Cleared Items)

Non-cleared items:

BSID Accounting: Secondary Index for Customers

BSIK Accounting: Secondary Index for Vendors

BSIM Secondary Index, Documents for Material

BSIP Index for Vendor Validation of Double Documents

BSIS Accounting: Secondary Index for G/L Accounts

Read only

Former Member
0 Likes
626

Hi Rajeev,

First instead of parameters ,use select-options

and use these select options for your select statements.

for selections,

use join for two tables and get data into one internal table,

then use for all entries to get the corressponding data fromthe third table.

Reward if useful,

Regards,

Talwinder

Read only

Former Member
0 Likes
627

Hi Rajeev,

if all the three fields are common in three tables bkpf , bseg and custom , then you can write single select statements using inner join statements for the tables using the select-options

if customer number not entered.

select requried fields from bkpf and bseg using inner join where the saknr = select option

date = select-option

fiscal year = select option.

then using all entries get the entries from custom table equating the common fields.

if customer number is entered then the reverse the above procedure.

with regards

brijesh