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: 

hai need some help regarding cluster tables

0 Kudos

hi

my requirement is to identify the employees ( by emp no-pernr) who meet this criteria:

all employees who have a record in crt table ( cluster pcl2) with a cumulation type of 'y' in the calender year of 2007.

and write a list of these employees no to a file on the c: drive of the presentation server.

please help me its urgent.

points will be rewarded.

2 REPLIES 2

Former Member
0 Kudos

Hi

here below parts of a program I made (i also acces cluster b2)

Data declaration

      • Tables

tables: teven,

pcl1, pcl2,

t569b, "Verwaltung archivierter Cluster B2

t001p, "Personalbereiche/-teilbereiche

pc2b0, "für Dokumentaion bei Selectoptions

t503, "Personengruppe/-kreise

t512t, "Texte: Lohn-Gehaltsarten

t529t, "Texte: Personalmassnahmen

t531s, "Texte: Terminarten

t533t, "Texte: Urlaubsarten

t546t, "Texte: Abrechnungsarten

t548t, "Texte: Datumsarten

t549q, "Abrechnungsperioden

t549n, "Texte: Periodenmodifikator

t554t, "Texte: Ab-/Anwesenheitsarten

t555b, "Texte: Zeitarten

t555f, "Texte: Zeitauswertungsfehler

t555q, "Texte: Saldokorrektur

t555t, "Texte: Mehrarbeitsverrechnungsart

t554ht, "Texte AuswArt für AnAbwesenheiten XUJPH9K014151

t555v, "Texte: Zeiterfassungsstatus

t556b, "Texte: Anwesenheitsgenehmigungen

t556q, "Texte: Abwesenheitskontingente

t556t, "Texte: Vertretungsarten

t557t, "Texte: Bereitschaftsarten

t559n, "Texte Kürzungsregeln für Urlaubskumulation

t559s, "Texte: Rundungsregeln

dd03m. "DDIC-Texte

        • DATA

data : w_PERIOD LIKE T009B-POPER.

data : w_YEAR LIKE T009B-BDATJ.

data : selperiod(6) type n.

DATA: SRTFDLOW LIKE PCL2-SRTFD. "YREP30K068142

DATA: SRTFDHIGH LIKE PCL2-SRTFD VALUE "YREP30K068142

'9999999999999999999999999999999999999999'.

include RPC2B202.

include RPC2RX02.

include RPPPXD00.

include RPPPXD10.

include RPC2B201.

routine to read cluster B2

form read_cluster_b2 changing l_header_ok.

data : l_zl type pc2bf occurs 2.

data : st_zl type pc2bf.

data : l_dynpread type dynpread occurs 2 with header line.

srtfdlow = cl_pt_cluster_util=>srtfd_low_init(

im_pernr = w_pernr

im_relid = 'B2' ).

srtfdhigh = cl_pt_cluster_util=>srtfd_high_init(

im_pernr = w_pernr

im_relid = 'B2' ).

select * from pcl2 where relid eq 'B2'

and srtfd between srtfdlow and srtfdhigh

and srtf2 eq '00'

order by primary key.

check pcl2-srtfd+8(6) = selperiod.

check pcl2-srtfd+14(1) = '1'. "Type de cluster 1

b2-key = pcl2-srtfd.

move-corresponding pcl2 to keytable.

move-corresponding b2-key to keytable.

append keytable.

endselect.

loop at keytable.

b2-key = keytable.

move-corresponding keytable to hd.

      • Import cluster B2

rp-imp-c2-b2.

endloop.

loop at zl where datum = w_date.

append zl to l_zl.

endloop.

data : es_selfield type slis_selfield,

e_exit.

call function 'REUSE_ALV_POPUP_TO_SELECT'

exporting

  • I_TITLE =

  • I_SELECTION = 'X'

  • I_ALLOW_NO_SELECTION =

  • I_ZEBRA = ' '

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_CHECKBOX_FIELDNAME =

  • I_LINEMARK_FIELDNAME =

  • I_SCROLL_TO_SEL_LINE = 'X'

i_tabname = 'PC2BF'

i_structure_name = 'PC2BF'

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • I_CALLBACK_PROGRAM =

  • I_CALLBACK_USER_COMMAND =

  • IS_PRIVATE =

importing

es_selfield = es_selfield

e_exit = e_exit

tables

t_outtab = l_zl

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

check e_exit is initial.

read table l_zl into st_zl index es_selfield-tabindex.

w_from = st_zl-beguz.

l_dynpread-fieldname = 'W_FROM'.

write w_from to l_dynpread-fieldvalue.

append l_dynpread.

clear l_dynpread.

w_to = st_zl-enduz.

l_dynpread-fieldname = 'W_TO'.

write w_to to l_dynpread-fieldvalue.

append l_dynpread.

clear l_dynpread.

endform. " read_cluster_b2

Good luck

David

Former Member
0 Kudos

I have same kind of requirement. could you please share your solution.