04-11-2008 1:59 PM
hi all,
this is my select query on table BSEG table:
*************************************
SELECT bukrs
belnr
gjahr
buzei
KOART
mwskz
kostl
lifnr
aufnr
werks
ebeln
txjcd
projk FROM bseg
INTO TABLE i_bseg
FOR ALL ENTRIES IN i_ad_tab
WHERE bukrs EQ i_ad_tab-bukrs AND
belnr EQ i_ad_tab-belnr AND
gjahr EQ i_ad_tab-gjahr.
*************************************
when i m doing SQL trace ST05 on this query and in the detail statement showed the following query
************************************
SELECT
"MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO" , "TIMESTMP" ,
"PAGELG" , "VARDATA"
FROM
"RFBLG"
WHERE
"MANDT" = ? AND "BUKRS" = ? AND "BELNR" = ? AND "GJAHR" = ?
ORDER BY
"MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO"
************************************
what is RFBLG table in SE11, but could not find it.
what is RFBLG?also, the above select query giving me performance issues.. the "for all entries" clause is used as per norms...
please suggest a solution..
04-11-2008 2:09 PM
hi
good
The famous BSEG table is a cluster table.
It is as was correctly stated part of the Accounting Document Segment. It is part of the Pool cluster RFBLG and lives in the package: FBAS (Financial accounting 'Basis').
You can't read a cluster table exactly the way you read a database (old speak, transparent table).
You can use a program to read called RFPPWF05
Note 435694: Display BSEG item by calling FB09D (modified FB09)
Other possiblity: Other possibility: CALL DIALOG 'RF_ZEILEN_ANZEIGE', but since this is a dialog I don't think this would work.
In any event go to FBAS Package (development class) to see your business objects, class library and functions.
you must use keyfields bukrs , belnr, gjahr
(so 1st select table bkpf) to select bseg.
or use secondary index tables:
bsas, bsis, bsik, bsak, bsid, bsad
Regards,
Raj.
04-11-2008 2:09 PM
hi
good
The famous BSEG table is a cluster table.
It is as was correctly stated part of the Accounting Document Segment. It is part of the Pool cluster RFBLG and lives in the package: FBAS (Financial accounting 'Basis').
You can't read a cluster table exactly the way you read a database (old speak, transparent table).
You can use a program to read called RFPPWF05
Note 435694: Display BSEG item by calling FB09D (modified FB09)
Other possiblity: Other possibility: CALL DIALOG 'RF_ZEILEN_ANZEIGE', but since this is a dialog I don't think this would work.
In any event go to FBAS Package (development class) to see your business objects, class library and functions.
you must use keyfields bukrs , belnr, gjahr
(so 1st select table bkpf) to select bseg.
or use secondary index tables:
bsas, bsis, bsik, bsak, bsid, bsad
Regards,
Raj.
04-11-2008 2:10 PM
BSEG is a cluster table and RFBLG is the name of the Table Cluster (see the Delivery and Maintenance tab in SE11 for BSEG).
With FOR ALL ENTRIES it is important that table i_ad_tab is not empty otherwise all data will be selected.
Hope it helps.
04-11-2008 2:20 PM
Hi,
RFBLG it is a Cluster of tables and one of this table is the BSEG.
A Cluster table has only the primary key and the other fields are in the other tables packed like BSEG.
The Cluster RFBLG has the following tables:
BSEG, BSEC, BSED, BSES ans BSET.
Regards,
Fernando
04-14-2008 5:52 AM
hi raj,
can you please explain how do i use the two transaction codes you have mentioned to replace the select query?