2008 Apr 13 4:22 AM
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 !!!!
2008 Apr 13 12:52 PM
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 !!!!
2008 Apr 13 5:54 AM
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
2008 Apr 13 7:47 AM
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
2008 Apr 13 12:52 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |