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

hi fetching data from cluster table

Former Member
0 Likes
1,011

hi

i have to use 3 tables from FICO Modules

pa0006, bseg and bkpf.

but bseg is a cluster table.

i want to fetch data from 3 tables but bseg table is giving error while running prog as it is a cluster table.

my question is how to fetch data from cluster table through select query.

thanx

rocky

hi

i have to use 3 tables from FICO Modules

pa0006, bseg and bkpf.

but bseg is a cluster table.

i want to fetch data from 3 tables but bseg table is giving error while running prog as it is a cluster table.

my question is how to fetch data from cluster table through select query.

thanx

rocky

7 REPLIES 7
Read only

Former Member
0 Likes
958

hi Rocky ...

here is a sample code ..

**Subroutine to get BSIS data(G/L Accounts)
  PERFORM GET_BSIS_DATA.

**Subroutine to get BSAS data(G/L Accounts (Cleared Item)
  PERFORM GET_BSAS_DATA.

* Proceed only if data found
  CHECK GV_NODATA_FLG IS INITIAL.

**Subroutine to get BKPF data(Accounting Document Header)
  PERFORM GET_BKPF_DATA.

**Subroutine to get BSEG data(Accounting Document Segment)
  PERFORM GET_BSEG_DATA.

FORM GET_BSIS_DATA.

  CLEAR   IT_GLACCOUNTS.
  REFRESH IT_GLACCOUNTS.

  SELECT BUKRS
         GJAHR
         BELNR
      FROM BSIS INTO TABLE IT_GLACCOUNTS
         WHERE BUKRS IN S_BUKRS     AND
             ( HKONT IN S_HKT_IC    OR
               HKONT IN S_HKT_TX )  AND
               BELNR IN S_BELNR     AND
               BUDAT IN S_BUDAT .

ENDFORM.                    " GET_BSIS_DATA


FORM GET_BSEG_DATA.
  CLEAR IT_BSEG.

  IF NOT IT_GLACCOUNTS[] IS INITIAL.
    SELECT BUKRS
           BELNR
           GJAHR
           BUZEI
           SHKZG
           MWSKZ
           DMBTR
           KOSTL
           AUFNR
           XAUTO
           HKONT
           PROJK
           XBILK
        FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_BSEG
            FOR ALL ENTRIES IN IT_GLACCOUNTS
            WHERE BUKRS = IT_GLACCOUNTS-BUKRS AND
                  BELNR = IT_GLACCOUNTS-BELNR AND
                  GJAHR = IT_GLACCOUNTS-GJAHR.

  ENDIF.                    "IF NOT IT_BKPF[] IS INITIAL
ENDFORM.                    " GET_BSEG_DATA

Read only

andreas_mann3
Active Contributor
0 Likes
958

hi,

use tables bsis, bsik, bsid (resp. bsas, bsak or bsad) instead of bseg or use logical database like brf or sdf

A.

Message was edited by:

Andreas Mann

Read only

Former Member
0 Likes
958
Read only

Former Member
0 Likes
958

u can't do aggregate functions or joins on cluster table... but u can definately select data frm BSEG table .... use FOR ALL ENTRIES.... and declare 2 different ITABS with complete primary key ...and then using control break statements do the processing... on ITABS

hope this will help

bbye tac care

Ashwani

Read only

0 Likes
958

could u pl give me coding example for my tables

Read only

Former Member
0 Likes
958

Hello,

To read <b>BSEG</b> efficiently,check this link:

<b>

regards,

Beejal

**reward if it helps

Read only

Former Member
0 Likes
958

Can't really say without seeing your code. Could you post it please?

Rob