Application Development 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: 

ST05 Trace on a select query on BSEG table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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.

che_eky
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

hi raj,

can you please explain how do i use the two transaction codes you have mentioned to replace the select query?