12-24-2007 7:44 AM
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
12-24-2007 10:17 AM
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'
12-24-2007 7:57 AM
just write the select query as u write for transparent tables.
and please make your requirement clear.
Regards
ANUPAM
12-24-2007 8:20 AM
12-24-2007 9:15 AM
Hi,
Your requirement in not clear, what ever may be your requirement u have to write select statement. But dont 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 dont give loop when u r accessing to Pool/cluster table.
12-24-2007 9:45 AM
my requirement is to calculate 'No. of Hours worked in the Previous 12 months'......and the provided me above said...logic...
12-24-2007 10:17 AM
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'
12-24-2007 12:54 PM
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...
12-26-2007 9:53 AM
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
12-28-2007 8:09 AM