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: 

Cluster Table

former_member187457
Active Contributor
0 Kudos

Hi All

I want to use Cluster table ......following are the Query...

"Read CLSTR table b2, read sub table ZL looking for wagetype (LGART)= 9001. Cumulate field ANZHL for each entry where LGART=9001 for last 365 days including system date at runtime (system date and prior 364 days)"

i didnt work on cluster table...

Plz help me in solving this query..

Thnx

Rohit

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi rohit,

Retreving cluster data r little bit different comparing to ordinary reports, we do it using LDBS,.

first specify the ldb name in when ur creating the program,

then specify the root node of ldb which ur using and also infotypes.

here is the example shown.

TABLES PERNR.

INFOTYPES: 0001,0006.

To retrieve the data from this infotypes using macros or funcitons modules.

EXAMPLE ON MACROS:

RP-READ-INFOTYPE PERNR-PERNR 0006 P0006 PN-BEGPS PN-ENDPS. or

Using function module HR_READ_INFOTYPE'

8 REPLIES 8

Former Member
0 Kudos

just write the select query as u write for transparent tables.

and please make your requirement clear.

Regards

ANUPAM

0 Kudos

use pa0000-pernr to read CLSTR table b2..........

Former Member
0 Kudos

Hi,

Your requirement in not clear, what ever may be your requirement u have to write select statement. But don’t use select * because in Pool/cluster tale large number of data is present. So u need to write select single * and access to that particular field don’t give loop when u r accessing to Pool/cluster table.

0 Kudos

my requirement is to calculate 'No. of Hours worked in the Previous 12 months'......and the provided me above said...logic...

Former Member
0 Kudos

Hi rohit,

Retreving cluster data r little bit different comparing to ordinary reports, we do it using LDBS,.

first specify the ldb name in when ur creating the program,

then specify the root node of ldb which ur using and also infotypes.

here is the example shown.

TABLES PERNR.

INFOTYPES: 0001,0006.

To retrieve the data from this infotypes using macros or funcitons modules.

EXAMPLE ON MACROS:

RP-READ-INFOTYPE PERNR-PERNR 0006 P0006 PN-BEGPS PN-ENDPS. or

Using function module HR_READ_INFOTYPE'

0 Kudos

Hi Anil

Thnx for ur suggestion...

I did tht already....

its a part of HR report so all the infotypes, Ldb has been declared...appropriatetly......i had to fatch 38 fields out of then this one is lil complicated ,i have doen with other fields....bt no one used cluster tables...thts y i m in problem...dude...

so any help plzz.....let me know...

0 Kudos

Hi Rohit,

Try to apply the concept described below in your program.

May be it will help..

Am assuming you already have other fields appended in ITAB.

You can copy the cluster table data in one internal table say itab_qave and follow the logic as seen below.

LOOP AT ITAB.

READ TABLE ITAB_QAVE WITH KEY PRUEFLOS = ITAB-PRUEFLOS.

IF SY-SUBRC = 0.

ITAB-INSPDT = ITAB_QAVE-VAEDATUM.

ITAB-INSPBY = ITAB_QAVE-VAENAME.

MODIFY ITAB.

ENDIF.

ENDLOOP.

Reward points if useful.

-Bhavin P Shah

former_member187457
Active Contributor
0 Kudos

thnx