REPORT zhhr012_open_closed_vacancy

NO STANDARD PAGE HEADING
MESSAGE-ID zhhr
LINE-SIZE 132.
***********************************************************************
*
A M T R A K
*
*=====================================================================*
* Program Title
: R-HR-020-080-010 Open & Closed Vacancy Report*
* Author
: Sudha Srinivasan
*
* Date
: 27-JUNE-06
*
* SAP Change Request #: ECDK900523
*
*---------------------------------------------------------------------*
* Program Name : ZHHR012_OPEN_CLOSED_VACANCY
*
* Transaction : ZHR012
*
* FRICE ID
: R012
*
* Project
: iTrak - mySAP ERP 2005, ECC 6.0
*
* Description : This program sends the vacancy details of
*
*
applicants by APP districts and EEo category
*
* Type
: Report
*
* Run Freq
: Weekly
*
* Dev Class
: ZHHR
*
*---------------------------------------------------------------------*
*
MODIFICATION HISTORY
*
*---------------------------------------------------------------------*
* Request | Date
| ID
| Description
*
*---------------------------------------------------------------------*
* ECDK900523 27-Jun-06 SRINIVS Original Development
*
* ECDK900525 23-Aug-06 SRINIVS SS01- Report Headings and Corrections *
* ECDK900525 30-Aug-06 DEEGUPTA DK01- Remove ZTH_EVENT
*
* ECDK902166 15-Sep-06 DEEGUPTA DK02- Remove IT1007 Check from Clsd Vc*
***********************************************************************
*---------------------------------------------------------------------*
*
I N C L U D E
*
*---------------------------------------------------------------------*
INCLUDE: zzgeneric_include. " For finding the output file paths
*----------------------------------------------------------------------*
*
T Y P E S
*
*----------------------------------------------------------------------*
TYPE-POOLS: slis.
TYPES:
BEGIN OF t_pos,
plnobjid TYPE
status
TYPE
begda
TYPE
endda
TYPE
END OF t_pos,

hrp1007-objid,
hrp1007-status,
hrp1007-begda,
hrp1007-endda,

BEGIN OF t_actions,
pernr TYPE pa0000-pernr,
endda TYPE pa0000-endda,
begda TYPE pa0000-begda,
massn TYPE pa0000-massn,
massg TYPE pa0000-massg,
aedtm TYPE pa0000-aedtm,
stat2 TYPE pa0000-stat2,
END OF t_actions,

"Positions
"Position Status - 0(Open)/2(Filled)
"Begin Date
"End Date

"Personnel Number
"End Date
"Begin date
"Action Type
"Action Reason
"Change Date
"Status

BEGIN OF t_pernr,
pernr TYPE pb4002-pernr,
objid TYPE pb4002-objid,
begda TYPE pb4002-begda,
endda TYPE pb4002-endda,
END OF t_pernr,

"Applicant Number
"Applicant Position ID
"Begin date
"End Date

BEGIN OF t_rep,
applno
TYPE
vacnum
TYPE
vacdesc
TYPE
respo
TYPE
resrf
TYPE
stell
TYPE
eeoct
TYPE
orgeh
TYPE
orgtext
TYPE
persa
TYPE
patext
TYPE
stras
TYPE
ort01
TYPE
regio
TYPE
pstlz
TYPE
addrs(60) TYPE
btrtl
TYPE
trfg1
TYPE
pernr
TYPE
apsta
TYPE
strea
TYPE
persg
TYPE
appgrp(8) TYPE
nachn
TYPE
vorna
TYPE
gesch
TYPE
racky
TYPE
slart
TYPE
slabs
TYPE
edlvl
TYPE
edcert
TYPE
statx
TYPE
reatx
TYPE
int(1)
TYPE
begda
TYPE
END OF t_rep,

pb4002-pernr, "Personnel Number
pb4002-objid, "Vacancy Number
hrp1000-mc_stext, "Vacancy Description
t750x-respo, "Line Manager
t750x-resrf, "Responsible Person
hrp1001-objid, "Job
t5u13-eeoct, "EEO-1 Category
hrp1001-objid, "Department
hrp1000-stext, "Department Text
hrp1008-persa, "Personnel Area
t500p-name1, "Personnel Area Text
t500p-stras, "House number/street
t500p-ort01, "Address Line 1
t500p-regio, "State
t500p-pstlz, "Zip Code
c,
"Personnel Area Address
hrp1008-btrtl, "Personnel Subarea
hrp1005-trfg1, "Pay Scale Group
pa0001-pernr, "PERNR/Applicant no
pb4000-apsta, "Applicant Status
pb4000-strea, "Applicant status reason
pb0001-persg, "Applicant Group
c,
"Applicant Group Text
pb0002-nachn, "Applicant Last Name
pb0002-vorna, "Applicant First Name
pb0002-gesch, "Applicant Sex
pb0077-racky, "Ethnic Origin
pb0022-slart, "Educational Establishment
pb0022-slabs, "Certificate
t517t-stext, "Educational Establishment Text
t519t-stext, "Certificate Text
t751b-statx, "Applicant Status Text
t751c-reatx, "Applicant Status Reason Text
c,
"Interviewed
pa0000-begda, "Vacancy Filled Date

BEGIN OF t_out,
vacnum(8) TYPE
vacdesc(40) TYPE
respo(8)
TYPE
resrf(3)
TYPE
eeoct(2)
TYPE
orgtext(40) TYPE
persa(4)
TYPE
patext(30) TYPE
addrs(60) TYPE
btrtl(4)
TYPE
trfg1(8)
TYPE
pernr(8)
TYPE
apsta(1)
TYPE
appgrp(8) TYPE

c,
c,
c,
c,
c,
c,
c,
c,
c,
c,
c,
c,
c,
c,

" Size 426
"Vacancy Number
"Vacancy Description
"Line Manager
"Responsible Person
"EEO-1 Category
"Department Text
"Personnel Area
"Personnel Area Text
"Personnel Area Address
"Personnel Subarea
"Pay Scale Group
"PERNR/Applicant no
"Applicant Status
"Applicant Group Text

line(426) TYPE c. * Table Data containing the Vacany report details it_rep TYPE STANDARD TABLE OF t_rep. * For ALV Event it_events TYPE slis_t_event. c. c. END OF t_file. st_sort TYPE slis_sortinfo_alv. * ALV * For Field catalog it_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv. * Table Data containing the applicant data for vacant positions it_pernr TYPE STANDARD TABLE OF t_pernr. st_pos TYPE t_pos. . st_actions TYPE t_actions. st_file TYPE t_file. c. c. * For ALV header display it_listheader TYPE STANDARD TABLE OF slis_listheader. DEFINE f_cat. st_rep TYPE t_rep. TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE BEGIN OF t_file. * For Interface st_out TYPE t_out. c. it_out TYPE TABLE OF t_out. * Table Data containing the action data for each pernr it_actions TYPE STANDARD TABLE OF t_actions. * MACRO used for catlog preparation. st_fieldcat-col_pos = &1. st_listheader TYPE slis_listheader. * Events st_events TYPE zth_events. c. * Download Fixed Length File it_file TYPE TABLE OF t_file. st_fieldcat TYPE slis_fieldcat_alv. * For Header lst_hdr TYPE t_out. c. c. * Sort it_sort TYPE slis_t_sortinfo_alv. "Applicant Last Name "Applicant First Name "Applicant Sex "Ethnic Origin "Educational Establishment Text "Certificate Text "Applicant Status Text "Applicant Status Reason Text "Interviewed "Vacancy Filled Date " Download *----------------------------------------------------------------------* * D A T A D E C L A R A T I O N S * *----------------------------------------------------------------------* * Table Data containing the position details with Postion status DATA: it_pos TYPE STANDARD TABLE OF t_pos. c.nachn(40) vorna(40) gesch(1) racky(2) edlvl(20) edcert(40) statx(20) reatx(30) int(1) begda(8) END OF t_out. c. st_pernr TYPE t_pernr. * For Layout structure st_layout TYPE slis_layout_alv.

endif. *----------------------------------------------------------------------* * C O N S T A N T S * *----------------------------------------------------------------------* CONSTANTS: c_tab(1) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab. st_fieldcat-seltext_l = &5. SELECTION-SCREEN END OF BLOCK blk1. SELECTION-SCREEN BEGIN OF LINE. st_fieldcat-no_out = 'X'. SELECTION-SCREEN SKIP 1. PARAMETERS: p_cvac RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND f1. if &3 = 'G'. SELECTION-SCREEN COMMENT 52(27) text-ss7 FOR FIELD p_dlchr. SELECTION-SCREEN BEGIN OF BLOCK blk4 WITH FRAME TITLE text-ss4. SELECTION-SCREEN END OF BLOCK blk2. SELECTION-SCREEN COMMENT 5(30) text-015 FOR FIELD p_cvac. SELECTION-SCREEN END OF LINE. PARAMETERS : p_ovac RADIOBUTTON GROUP rad1. SELECT-OPTIONS s_rdate FOR sy-datum NO-EXTENSION. *----------------------------------------------------------------------* * G L O B A L D E C L A R A T I O N S * *----------------------------------------------------------------------* DATA: g_repid TYPE sy-repid. SELECTION-SCREEN COMMENT 5(16) text-ss5 FOR FIELD p_creat. SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-ss2. PARAMETERS: p_appl RADIOBUTTON GROUP rad2 USER-COMMAND f2 MODIF ID sc1 DEFAULT 'X'. * Header PARAMETERS: p_headr AS CHECKBOX. * Delimit Character PARAMETERS: p_dlchr(1) TYPE c. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN COMMENT 5(30) text-016 FOR FIELD p_ovac. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN BEGIN OF LINE. g_flag(1) TYPE c. st_fieldcat-datatype = &3. "Flag *----------------------------------------------------------------------* * S E L E C T I O N S C R E E N S * *----------------------------------------------------------------------* SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-ss1. st_fieldcat-tech = 'X'. SELECTION-SCREEN END OF LINE. * Create File PARAMETERS: p_creat AS CHECKBOX. END-OF-DEFINITION. . append st_fieldcat to it_fieldcat. st_fieldcat-fieldname = &2.st_fieldcat-tabname = 'IT_REP'. clear st_fieldcat. SELECTION-SCREEN COMMENT 5(30) text-017 FOR FIELD p_appl. * Application Server SELECTION-SCREEN BEGIN OF LINE. st_fieldcat-seltext_s = &4. SELECTION-SCREEN COMMENT 25(23) text-ss6 FOR FIELD p_headr.

IF s_rdate-low IS INITIAL OR s_rdate-high IS INITIAL. APPEND s_rdate. "Input file SELECTION-SCREEN END OF BLOCK blk4. * ENDIF. * s_rdate-low = st_events-endda + 1. " SS01+ * ENDIF. PARAMETERS : p_pres RADIOBUTTON GROUP rad2. s_rdate-option = 'EQ'. * SELECT SINGLE * FROM zth_events INTO st_events * WHERE interface = 'R012' * AND filecode = 'C'. * Application Server Logical File PARAMETERS: p_logfn TYPE filename-fileintern MODIF ID sc2 DEFAULT 'Z_REP_HR_FILEPATH' NO-DISPLAY. * IF sy-subrc EQ 0. * s_rdate-low = st_events-endda + 1. s_rdate-option = 'EQ'. ELSE. * Presentation server file details PARAMETERS: p_prdir TYPE ibipparms-path MODIF ID sc2. MESSAGE e304(zhhr). * SELECT SINGLE * FROM zth_events INTO st_events * WHERE interface = 'R012' * AND filecode = 'O'. PARAMETERS: p_prefn TYPE ibipparms-path MODIF ID sc2. * IF NOT p_ovac IS INITIAL. * s_rdate-high = sy-datum. * s_rdate-sign = 'I'. SELECTION-SCREEN COMMENT 5(30) text-018 FOR FIELD p_pres. * ENDIF. * s_rdate-sign = 'I'. " SS01+ * ENDIF. * Application Server Download File Name PARAMETERS: p_appfn TYPE rlgrap-filename MODIF ID sc1. * DK01. * IF sy-subrc EQ 0.SELECTION-SCREEN END OF LINE. * s_rdate-high = sy-datum. * Presentation Server SELECTION-SCREEN BEGIN OF LINE. * Please enter data selection period {from and to}. PERFORM selection_screen_output. PARAMETERS: p_appdir TYPE char4 MODIF ID kc DEFAULT 'R012'. APPEND s_rdate. *----------------------------------------------------------------------* * AT S E L E C T I O N S C R E E N *----------------------------------------------------------------------* AT SELECTION-SCREEN. *----------------------------------------------------------------------* * INITIALIZATION *----------------------------------------------------------------------* INITIALIZATION. * DK01.Start of Delete * IF NOT p_cvac IS INITIAL. * DK01+ Start of Insert .End of Delete *----------------------------------------------------------------------* * AT S E L E C T I O N S C R E E N O U T P U T *----------------------------------------------------------------------* AT SELECTION-SCREEN OUTPUT. SELECTION-SCREEN END OF LINE.

* Download the files . * Move the contents to IT_FILE PERFORM prepare_output. REFRESH it_file.S E L E C T I O N * *----------------------------------------------------------------------* END-OF-SELECTION. Validate the selection criteria entered on the selection-screen Check if the input/output file details are entered PERFORM zvalidate_sel_screen USING p_appl p_logfn p_appdir p_appfn p_pres p_prefn p_prdir. DK01+ End of Insert PERFORM validate_dates. SORT it_rep BY vacnum. ENDLOOP. CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm = 'SJOB'. IF p_cvac = 'X'. *----------------------------------------------------------------------* * M A I N P R O C E S S I N G F L O W * *----------------------------------------------------------------------* START-OF-SELECTION. *----------------------------------------------------------------------* * E N D . ENDIF. ENDIF. IF NOT p_creat IS INITIAL. LOOP AT it_pos INTO st_pos. * Retrieve data for closed vacancies based on actions PERFORM process_closed_vac. Begin Date should not be after Today. CHECK NOT p_creat IS INITIAL. * Derive the file names PERFORM z_get_file_names. * Retrieve data for Open vacancies PERFORM open_vac_rep_data USING st_pos-plnobjid st_pos-begda st_pos-endda. " DK01ENDIF. PERFORM f4_help_directory_browser CHANGING p_prdir. *----------------------------------------------------------------------* * AT SELECTION-SCREEN ON VALUE REQUEST * *----------------------------------------------------------------------* AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_prdir. * Get the Vacancy data for all closed positions PERFORM get_new_actions. ELSEIF p_ovac = 'X'. IF NOT p_creat IS INITIAL.O F .* * * * * IF s_rdate-low > sy-datum. ENDIF. * Get the Vacancy data for all closed positions PERFORM get_vacant_pos. MESSAGE e317(zhhr).

Onto presentation server PERFORM z_download_files_to_pre. ENDIF. screen-input = 0. DATA : l_date TYPE d.* * * * * * * * IF p_pres = c_true . s_rdate-option = 'EQ'. s_rdate-option = 'EQ'. l_date = s_rdate-high. SELECT SINGLE * FROM zth_events INTO st_events WHERE interface = 'R012' AND filecode = 'O'. s_rdate-sign = 'I'. IF p_appl = c_true . IF NOT p_cvac IS INITIAL. Onto application server PERFORM z_download_files_to_app. IF sy-subrc EQ 0. IF screen-name = 'P_PRDIR'.End of Delete ENDIF. ENDIF. DK01. ENDIF. s_rdate-low = st_events-endda + 1. IF sy-subrc EQ 0. * * LOOP AT SCREEN. CLEAR p_prdir. IF NOT p_ovac IS INITIAL. SELECT SINGLE * FROM zth_events INTO st_events WHERE interface = 'R012' AND filecode = 'C'. ENDIF. screen-input = 0. APPEND s_rdate. ENDIF. s_rdate-low = st_events-endda + 1. ENDIF. REFRESH s_rdate. s_rdate-sign = 'I'. IF sy-ucomm = 'F1' OR s_rdate[] IS INITIAL. DK01. s_rdate-high = l_date. APPEND s_rdate. *&---------------------------------------------------------------------* *& Form selection_screen_output *&---------------------------------------------------------------------* * Selection Screen Output *----------------------------------------------------------------------* FORM selection_screen_output . PERFORM update_event. ENDIF. . s_rdate-high = l_date. Display Report PERFORM zwrite_report. ENDIF.Start of Delete IF g_ret_code IS INITIAL. If the application server radiobutton is selected then disable the Presentation server fields IF p_appl = c_true. IF screen-name = 'P_PREFN'. ENDIF.

* Get the Required Heading PERFORM get_header. " Tab l_dchar = c_tab. ENDLOOP.CLEAR p_prefn. * Delimit Record PERFORM concatenate_out. IF NOT l_dchar IS INITIAL. ENDLOOP. IF screen-name = 'P_APPFN'. ENDFORM. st_file-line = lst_hdr. MODIFY SCREEN. ENDIF. ELSE. ENDIF. ENDIF. ENDAT. ENDIF. ENDFORM. IF screen-name = 'P_APPDIR'. DATA: l_dchar(1) TYPE c. CLEAR p_appfn. APPEND st_file TO it_file. screen-input = 0. screen-input = 0. APPEND st_file TO it_file. ENDIF. IF p_dlchr = 'T'. AT FIRST. "Delimit Character l_dchar = p_dlchr. st_file-line = st_out. ENDIF. ENDIF. * Delimited Heading PERFORM concatenate_headr. ENDIF. IF NOT p_headr IS INITIAL. ENDIF. " selection_screen_output *&---------------------------------------------------------------------* *& Form prepare_output *&---------------------------------------------------------------------* * Prepare Output to be Downloaded *----------------------------------------------------------------------* FORM prepare_output . ENDIF. IF p_pres = c_true. CLEAR st_file. IF NOT l_dchar IS INITIAL. " prepare_output *&---------------------------------------------------------------------* *& Form get_header . LOOP AT it_rep INTO st_rep. ELSE. screen-input = 0. * If the presentaion server radiobutton is selected then disable the * application server fields IF screen-name = 'P_APPDIR'. MOVE-CORRESPONDING st_rep TO st_out. CLEAR st_file.

lst_hdr-statx = 'VacAssgSt'(121).*&---------------------------------------------------------------------* * Fill Column Headings into Structure *----------------------------------------------------------------------* FORM get_header . " Tab l_dchar = c_tab. lst_hdr-begda = 'VacFilDat'(124). lst_hdr-respo = 'LineMgr'(103). lst_hdr-addrs = 'PA_Add'(109). lst_hdr-edcert = 'EdCert'(120). lst_hdr-apsta = 'AppStat'(113). lst_hdr-orgtext = 'Dept'(106). lst_hdr-racky = 'EO'(118). lst_hdr-nachn = 'L_Name'(115). " get_header *&---------------------------------------------------------------------* *& Form concatenate_headr *&---------------------------------------------------------------------* * Get Delimited Header *----------------------------------------------------------------------* FORM concatenate_headr . lst_hdr-patext = 'PA_Text'(108). lst_hdr-reatx = 'VacAssgRea'(122). CONCATENATE lst_hdr-vacnum lst_hdr-vacdesc lst_hdr-respo lst_hdr-resrf lst_hdr-eeoct lst_hdr-orgtext lst_hdr-persa lst_hdr-patext lst_hdr-addrs lst_hdr-btrtl lst_hdr-trfg1 lst_hdr-pernr lst_hdr-apsta lst_hdr-appgrp lst_hdr-nachn lst_hdr-vorna lst_hdr-gesch lst_hdr-racky . DATA: l_dchar(1) TYPE c. * Column Header Line lst_hdr-vacnum = 'VacNum'(101). lst_hdr-resrf = 'RespPer'(104). lst_hdr-trfg1 = 'PayScGrp'(111). lst_hdr-persa = 'PA'(107). lst_hdr-pernr = 'AppNum'(112). ENDFORM. lst_hdr-eeoct = 'EEO-1'(105). lst_hdr-int = 'I'(123). lst_hdr-gesch = 'Gender'(117). ENDIF. "Delimit Character l_dchar = p_dlchr. lst_hdr-btrtl = 'PSA'(110). lst_hdr-edlvl = 'EdLvl'(119). lst_hdr-vorna = 'F_Name'(116). lst_hdr-appgrp = 'AppGrp'(114). lst_hdr-vacdesc = 'VacDesc'(102). IF p_dlchr = 'T'.

" concatenate_headr *&---------------------------------------------------------------------* *& Form concatenate_out *&---------------------------------------------------------------------* * Record with Delimiter *----------------------------------------------------------------------* FORM concatenate_out . * Preparing Layout structure PERFORM set_layout. " Tab l_dchar = c_tab. " concatenate_out *&---------------------------------------------------------------------* *& Form zwrite_report *&---------------------------------------------------------------------* * Display ALV Report *----------------------------------------------------------------------* FORM zwrite_report . ENDIF.lst_hdr-edlvl lst_hdr-edcert lst_hdr-statx lst_hdr-reatx lst_hdr-int lst_hdr-begda INTO st_file-line SEPARATED BY l_dchar. ENDFORM. DATA: l_dchar(1) TYPE c. * Prepare ALV Event . ENDFORM. CONCATENATE st_out-vacnum st_out-vacdesc st_out-respo st_out-resrf st_out-eeoct st_out-orgtext st_out-persa st_out-patext st_out-addrs st_out-btrtl st_out-trfg1 st_out-pernr st_out-apsta st_out-appgrp st_out-nachn st_out-vorna st_out-gesch st_out-racky st_out-edlvl st_out-edcert st_out-statx st_out-reatx st_out-int st_out-begda INTO st_file-line SEPARATED BY l_dchar. * Prepare ALV field catalog for display PERFORM create_catalog. * Sorting PERFORM create_sort. IF p_dlchr = 'T'. "Delimit Character l_dchar = p_dlchr.

"Filename * Download the processed file l_filename = g_outp_fn. DATA: l_filename TYPE string. MESSAGE i301(zhhr). "Filename l_tablename TYPE char20. ENDFORM. PERFORM z_file_download USING l_filename. ENDIF. MESSAGE i302 WITH g_outp_fn. PERFORM z_pre_download USING l_filename l_tablename. MESSAGE i302 WITH g_outp_fn. " zwrite_report *&---------------------------------------------------------------------* *& Form z_download_files_to_pre *&---------------------------------------------------------------------* * Download the files into the presentation server *----------------------------------------------------------------------* FORM z_download_files_to_pre . IF NOT g_ret_code IS INITIAL. ENDIF. ENDFORM. " z_download_files_to_pre *&---------------------------------------------------------------------* *& Form z_download_files_to_app *&---------------------------------------------------------------------* * Download all the files to Application server *----------------------------------------------------------------------* FORM z_download_files_to_app . DATA: l_filename TYPE string. * Open the file OPEN DATASET pv_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. ENDIF. " z_download_files_to_app *&---------------------------------------------------------------------* *& Form z_file_download *&---------------------------------------------------------------------* * Download file on applicatin server *----------------------------------------------------------------------* FORM z_file_download USING pv_filename TYPE any. IF sy-subrc <> 0. "Tablename * Download the processed file l_filename = g_outp_fn.PERFORM fill_events. * Call ALV g_repid = sy-repid. . CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' EXPORTING i_callback_program = g_repid is_layout = st_layout it_fieldcat = it_fieldcat it_sort = it_sort it_events = it_events TABLES t_outtab = it_rep EXCEPTIONS program_error = 1 OTHERS = 2. l_tablename = 'IT_FILE'(020). ENDFORM. * Prepare ALV header for display PERFORM list_header. IF NOT g_ret_code IS INITIAL.

f_cat 29 'ORT01' 'G' ' ' ' '. f_cat 06 'ORGTEXT' ' ' 'Dept'(s06) 'Department'(c06). f_cat 11 'TRFG1' ' ' 'PayScGrp'(s11) 'Pay Scale Group'(c11). f_cat 07 'PERSA' ' ' 'PersArea'(s07) 'Personnel Area'(c07). f_cat 23 'INT' ' ' 'Int'(s23) 'Interviewed'(c23). f_cat 25 'APPLNO' 'G' ' ' ' '. f_cat 20 'EDCERT' ' ' 'EdCert'(s20) 'Educational Certificate'(c20) . f_cat 28 'STRAS' 'G' ' ' ' '. f_cat 08 'PATEXT' ' ' 'PA_Text'(s08) 'Personnel Area Text'(c08). ENDLOOP. f_cat 02 'VACDESC' ' ' 'VacDesc'(s02) 'Vacancy Description'(c02). f_cat 22 'REATX' ' ' 'VacAssgRea'(s22) 'Vacancy Assignment Reason'(c2 2). ENDFORM. f_cat 17 'GESCH' ' ' 'Gender'(s17) 'Gender'(c17). f_cat 14 'APPGRP' ' ' 'AppGrp'(s14) 'Applicant Group'(c14). " z_file_download *&---------------------------------------------------------------------* *& Form create_catalog *&---------------------------------------------------------------------* * Prepare Field Catalog for ALV Display *----------------------------------------------------------------------* FORM create_catalog . f_cat 33 'PERSG' 'G' ' ' ' '. f_cat 04 'RESRF' ' ' 'RespPer'(s04) 'Responsible Person'(c04). f_cat 01 'VACNUM' ' ' 'VacNum'(s01) 'Vacancy Number'(c01). f_cat 12 'PERNR' ' ' 'AppNum'(s12) 'Applicant Number'(c12). f_cat 27 'ORGEH' 'G' ' ' ' '. f_cat 24 'BEGDA' 'DATS' 'VacFillDte'(s24) 'Vacancy Filled Date'(c24).IF sy-subrc = 0. f_cat 26 'STELL' 'G' ' ' ' '. f_cat 19 'EDLVL' ' ' 'EdLvl'(s19) 'Educational Level'(c19). REFRESH it_fieldcat. LOOP AT it_file INTO st_file. f_cat 16 'VORNA' ' ' 'F_Name'(s16) 'First Name'(c16). f_cat 21 'STATX' ' ' 'VacAssgSt'(s21) 'Vacancy Assignment Status'(c2 1). f_cat 03 'RESPO' ' ' 'LineMgr'(s03) 'Line Manager'(c03). ENDFORM. f_cat 13 'APSTA' ' ' 'AppStat'(s13) 'Applicant Status'(c13). f_cat 32 'STREA' 'G' ' ' ' '. " create_catalog *&---------------------------------------------------------------------* *& Form set_layout *&---------------------------------------------------------------------* * Set Layout Structure *----------------------------------------------------------------------* . * Close the file CLOSE DATASET pv_filename. f_cat 15 'NACHN' ' ' 'L_Name'(s15) 'Last Name'(c15). f_cat 31 'PSTLZ' 'G' ' ' ' '. f_cat 30 'REGIO' 'G' ' ' ' '. * Tranfer the data from the internal table TRANSFER st_file TO pv_filename LENGTH 426. f_cat 34 'SLART' 'G' ' ' ' '. ENDIF. f_cat 09 'ADDRS' ' ' 'PA_Add'(s09) 'Personnel Area Address'(c09). f_cat 35 'SLABS' 'G' ' ' ' '. f_cat 05 'EEOCT' ' ' 'EEO-1'(s05) 'EEO-1 Category'(c05). f_cat 18 'RACKY' ' ' 'EthOrg'(s18) 'Ethnic Origin'(c18). f_cat 10 'BTRTL' ' ' 'PersSubArea'(s10) 'Personnel Subarea'(c10).

* Bulding in Events READ TABLE it_events WITH KEY name = slis_ev_top_of_page INTO ls_event. " Alternate Colors st_layout-max_linesize = 455. " top_of_page *&---------------------------------------------------------------------* *& Form list_header *&---------------------------------------------------------------------* * Get Header for Display *----------------------------------------------------------------------* FORM list_header . ENDFORM. " fill_events *---------------------------------------------------------------------* * FORM top_of_page * *---------------------------------------------------------------------* * Top of page event for basic list display * *---------------------------------------------------------------------* FORM top_of_page . . MOVE slis_ev_top_of_page TO ls_event-form. * Getting all the related events using the below function module CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 "simple list REUSE_ALV_LIST_DISPLAY IMPORTING et_events = it_events. MODIFY it_events FROM ls_event INDEX sy-tabix TRANSPORTING form. DATA: ls_event TYPE slis_alv_event. st_layout-min_linesize = 80. ENDFORM. l_text = 'Open Vacancy Report'(h45). st_layout-colwidth_optimize = c_true. ENDIF.FORM set_layout . "SS01*Begin: SS01+ IF p_ovac = 'X'. DATA : l_char(10) TYPE c. " set_layout *&---------------------------------------------------------------------* *& Form fill_events *&---------------------------------------------------------------------* * Fill Events ( Get top_of_page) *----------------------------------------------------------------------* FORM fill_events . st_listheader-typ = 'H'. ELSEIF p_cvac = 'X'. " Optimizes Length st_layout-zebra = c_true. "#EC CALLED CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = it_listheader. IF sy-subrc = 0. l_text = 'Closed Vacancy Report'(h46). ENDFORM. REFRESH it_listheader. * st_listheader-info = 'Closed Vacancy & Applts by APP Dist. l_text TYPE string. l_len TYPE i.'(h44). st_layout-window_titlebar = 'R-HR-020-080-010 Open & Closed Vacancy Report'(l25).

st_listheader-info = g_outp_fn. st_listheader-typ = 'S'. CLEAR st_listheader. APPEND st_listheader TO it_listheader. st_listheader-typ = 'S'. CLEAR st_listheader. st_listheader-key = 'Downloaded File'(h10). st_listheader-typ = 'S'. *End: SS01+ APPEND st_listheader TO it_listheader. l_len = STRLEN( g_outp_fn ). WRITE sy-datum TO st_listheader-info. ENDIF. st_listheader-key = 'Downloaded File'(h10). st_listheader-typ = 'S'. CLEAR st_listheader. ENDIF. st_listheader-info = g_outp_fn+0(60). st_listheader-typ = 'S'. CONCATENATE st_listheader-info 'To: '(h11) l_char INTO st_listheader-info SEPARATED BY space.ENDIF. APPEND st_listheader TO it_listheader.60. WRITE s_rdate-low TO st_listheader-info. WRITE sy-index TO st_listheader-info LEFT-JUSTIFIED. st_listheader-info = g_outp_fn+60(l_len). st_listheader-typ = 'S'. ELSE. *Get the actions data for all Hire actions SELECT pernr endda begda massn massg aedtm stat2 FROM pa0000 INTO TABLE it_actions . APPEND st_listheader TO it_listheader. CLEAR st_listheader. st_listheader-key = 'Run On:'(h05). CLEAR st_listheader. ENDFORM. WRITE sy-uzeit TO l_char. APPEND st_listheader TO it_listheader. st_listheader-key = 'Recs Processed'(h09). " list_header *&---------------------------------------------------------------------* *& Form get_new_actions *&---------------------------------------------------------------------* * Get the actions data for each PERNR *----------------------------------------------------------------------* FORM get_new_actions . l_len = l_len . CLEAR st_listheader. * st_listheader-key = 'Downloaded File'(h10). IF NOT p_creat IS INITIAL. APPEND st_listheader TO it_listheader. DESCRIBE TABLE it_rep LINES sy-index. st_listheader-key = 'Period :'(h07). CLEAR st_listheader. CONCATENATE st_listheader-info l_char INTO st_listheader-info SEPARATED BY space. st_listheader-info = l_text. WRITE s_rdate-high TO l_char. IF l_len > 60. APPEND st_listheader TO it_listheader.

* This PERNR will not be processed further. * If action 'No Show' exists for the employee.begin date and action type SORT it_actions DESCENDING BY pernr begda massn . DATA: l_index TYPE sy-tabix. * If the position for the PERNR exists with filled status * check if the there is any action type 'No show' * exists after hire action date. then * delete that entry from the actions table. * Get the actions date for transfer/promotion/demotion SELECT pernr endda begda massn massg aedtm FROM pa0302 APPENDING TABLE it_actions WHERE ( massn = '16' OR massn = '18' OR massn = '20' ) AND aedtm GE s_rdate-low AND aedtm LE s_rdate-high. ENDFORM. SELECT plans UP TO 1 ROWS FROM pa0001 INTO l_plans WHERE pernr = st_actions-pernr AND begda <= st_actions-begda AND endda >= st_actions-begda. * Delete the adjacent entries so that only the latest action * for the PERNR remains in the internal table * DELETE ADJACENT DUPLICATES FROM it_actions COMPARING pernr. for the same employee SELECT massn UP TO 1 ROWS FROM pa0000 INTO l_massn WHERE pernr = st_actions-pernr AND begda GE st_actions-begda AND ( massn = '50' OR massn = '51' ). * Sort the actions data based on PERNR. l_plans TYPE pa0001-plans. *For each PERNR in the actions data LOOP AT it_actions INTO st_actions. * Get the position details CLEAR l_plans. l_massn TYPE pa0000-massn. l_massn. l_objid TYPE hrp1001-objid. CONTINUE. l_objid. ENDSELECT. . l_index = sy-tabix. CLEAR: l_plans. " get_new_actions *&---------------------------------------------------------------------* *& Form Process_Closed_Vac *&---------------------------------------------------------------------* * Process Closed Vacancies *----------------------------------------------------------------------* FORM process_closed_vac. DELETE it_actions INDEX l_index.WHERE ( massn = '10' OR massn = '11' OR massn = '12' OR massn = '14' ) AND aedtm GE s_rdate-low AND aedtm LE s_rdate-high. ENDIF. IF sy-subrc EQ 0.

* Get the Applicant/Personnel Number st_rep-pernr = st_actions-pernr. " DK02ENDIF. "SS01* AND begda <= st_actions-endda "SS01+ * AND endda >= st_actions-begda. ENDFORM. l_objid = l_plans. * Begin : SS01+ . * IF sy-subrc = 0. "Process_Closed_Vac *&---------------------------------------------------------------------* *& Form closed_vac_rep_data *&---------------------------------------------------------------------* * Get the closed Vacancy data for all the PERNRs *----------------------------------------------------------------------* FORM closed_vac_rep_data USING value(pv_objid) TYPE hrp1001-objid value(pv_begda) TYPE p0000-begda value(pv_endda) TYPE p0000-endda. * EXIT. * Get the Position details for the PERNR PERFORM get_position_details USING pv_objid pv_begda pv_endda. * IF sy-subrc NE 0. "SS01+ * ENDSELECT. * End: SS01ENDLOOP. get the closed vacncy data for the PERNR PERFORM closed_vac_rep_data USING l_objid st_actions-begda st_actions-begda.End of Delete * Vacancy found. ** If no application number is found for the PERNR. SELECT aplno UP TO 1 ROWS FROM pa0139 INTO st_rep-applno WHERE pernr = st_actions-pernr.ENDSELECT. * ENDIF. exit the block. * DK02. IF sy-subrc = 0. * Begin : SS01+ CLEAR st_rep-applno. ENDSELECT. * End : SS01+ ENDIF. * DK02. IF sy-subrc NE 0.Start of Delete ** Check if the position exists in HRP1007 table * SELECT objid UP TO 1 ROWS FROM hrp1007 * INTO l_objid * WHERE plvar = '01' * AND otype = 'S' ** AND objid = l_plans "SS01* AND objid = l_objid "SS01+ * AND istat = '1' ** AND begda <= st_actions-begda "SS01** AND endda >= st_actions-endda. * SELECT SINGLE pernr FROM pb4005 INTO st_rep-applno * WHERE empnr = st_actions-pernr * AND begda <= pv_endda * AND endda >= pv_begda. * ENDIF. * Begin: SS01+ CLEAR st_actions.

ENDLOOP. "SS01PERFORM get_applicant_data USING st_pernr-pernr s_rdate-low s_rdate-high. APPEND st_rep TO it_rep. * Even if there is no applicant assigned to the vacancy append * the vacant position details only IF l_appl IS INITIAL.IF NOT st_rep-applno IS INITIAL. ENDIF. * Get the Position details for each of the open vacancy PERFORM get_position_details USING pv_objid pv_begda pv_endda."SS01+ * Begin : SS01+ ENDIF. * Get the applicant data * PERFORM get_applicant_data USING st_pernr-pernr pv_begda pv_endda. CLEAR st_rep. st_rep-pernr = st_pernr-pernr. . ENDFORM. ENDFORM. CLEAR l_appl. l_sobid TYPE hrp1001-sobid. * End : SS01+ * Get the corresponding applicant data for the PERNR PERFORM get_applicant_data USING st_rep-applno pv_begda pv_endda. DATA: l_objid TYPE hrp1001-objid. " closed_vac_rep_data *&---------------------------------------------------------------------* *& Form open_vac_rep_data *&---------------------------------------------------------------------* * Get the Open Vacancy data for all the applicants *----------------------------------------------------------------------* FORM open_vac_rep_data USING value(pv_objid) TYPE hrp1000-objid value(pv_begda) TYPE d value(pv_endda) TYPE d. * For each applicant assigned to the vacancyhe applicant data LOOP AT it_pernr INTO st_pernr WHERE objid = pv_objid. "DK01+ * PERFORM get_applicant_data * USING st_rep-applno s_rdate-low s_rdate-high. * End : SS01+ * Get the Vacancy Filled Date st_rep-begda = pv_begda. CLEAR st_rep. DATA: l_appl(1) TYPE c."SS 01+ * Set the flag to indicate that an applicant was assigned to the vacancy l_appl = 'X'. CLEAR st_rep. " open_vac_rep_data *&---------------------------------------------------------------------* *& Form get_position_details *&---------------------------------------------------------------------* * Get the position details *----------------------------------------------------------------------* FORM get_position_details USING value(pv_objid) TYPE hrp1001-objid value(pv_begda) TYPE p0000-begda value(pv_endda) TYPE p0000-endda. APPEND st_rep TO it_rep. * Done APPEND st_rep TO it_rep.

* Get the Job ID for that position CLEAR l_sobid. IF sy-subrc NE 0.* Get the position/vacancy number st_rep-vacnum = pv_objid. IF sy-subrc NE 0. Unit ID for department CLEAR l_sobid. ENDSELECT. ENDIF. ENDIF. IF sy-subrc = 0. *Get the Org. CLEAR : st_rep-respo. ENDIF. ENDSELECT. *Get the EEO category for the Job SELECT eeoct UP TO 1 ROWS FROM t5u13 INTO st_rep-eeoct WHERE stell = l_sobid AND begda <= pv_endda AND endda >= pv_begda. st_rep-stell = l_sobid. ENDSELECT. IF sy-subrc NE 0. CLEAR st_rep-vacdesc. ENDIF. SELECT sobid UP TO 1 ROWS FROM hrp1001 INTO l_sobid WHERE plvar = '01' AND otype = 'S' AND objid = pv_objid AND istat = '1' AND rsign = 'B' AND relat = '007' AND sclas = 'C' AND begda <= pv_endda AND endda >= pv_begda. st_rep-resrf. * Get the line manager ID & Personnel Officer ID for the vacancy SELECT respo resrf UP TO 1 ROWS FROM t750x INTO (st_rep-respo. INTO st_rep-vacdesc = '01' = '1' = 'S' = pv_objid <= pv_endda >= pv_begda.st_rep-resrf) WHERE otype = 'S' AND objid = pv_objid AND begda <= pv_endda AND endda >= pv_begda. CLEAR st_rep-eeoct. * Get the position/vacancy description SELECT mc_stext UP TO 1 ROWS FROM hrp1000 WHERE plvar AND istat AND otype AND objid AND begda AND endda ENDSELECT. SELECT sobid UP TO 1 ROWS FROM hrp1001 INTO l_sobid WHERE plvar = '01' AND istat = '1' AND otype = 'S' .

ENDIF.AND AND AND AND AND AND objid rsign relat sclas begda endda = pv_objid = 'A' = '003' = 'O' <= pv_endda >= pv_begda. ENDSELECT.Start * CONCATENATE st_rep-stras st_rep-ort01 st_rep-regio * st_rep-pstlz INTO st_rep-addrs . CLEAR : st_rep-patext. st_rep-pstlz. *SS01+ End ENDIF. * Get the Personnel Sub Area . * Concatenate the address details *SS01.st_rep-stras. st_rep-regio. SELECT stext UP TO 1 ROWS FROM hrp1000 INTO st_rep-orgtext WHERE plvar = '01' AND istat = '1' AND otype = 'O' AND objid = l_objid AND begda <= pv_endda AND endda >= pv_begda. * Get Personnel Area Text & Address details for the position SELECT SINGLE name1 stras ort01 regio pstlz FROM t500p INTO (st_rep-patext. CLEAR st_rep-persa. * Get the Org. '. * Get Personnel Area for the position SELECT persa UP TO 1 ROWS FROM hrp1008 INTO st_rep-persa WHERE plvar = '01' AND otype = 'S' AND objid = pv_objid AND istat = '1' AND begda <= pv_endda AND endda >= pv_begda. ENDIF. IF sy-subrc EQ 0. ENDIF. ELSE. IF sy-subrc NE 0. st_rep-orgeh = l_sobid. ENDSELECT. IF sy-subrc NE 0.st_rep-pstlz) WHERE persa = st_rep-persa. ENDSELECT. CLEAR st_rep-orgtext.st_rep-ort01. IF sy-subrc NE 0. st_rep-stras. Unit Text l_objid = l_sobid . st_rep-ort01. *SS01. st_rep-regio. CONCATENATE st_rep-addrs st_rep-pstlz INTO st_rep-addrs SEPARATED BY space.End *SS01+ Start CONCATENATE st_rep-stras st_rep-ort01 st_rep-regio INTO st_rep-addrs SEPARATED BY '.

IF sy-subrc NE 0. . CLEAR st_rep-trfg1. DATA : l_date TYPE d. ENDSELECT. ENDSELECT. ENDSELECT. CLEAR st_rep-persg. ENDIF. IF sy-subrc NE 0. CLEAR: st_rep-apsta. IF sy-subrc NE 0. ENDIF. st_rep-strea. * Get the Applicant Status SELECT apsta strea UP TO 1 ROWS FROM pb4000 INTO (st_rep-apsta.st_rep-strea) WHERE pernr = pv_applno AND begda <= pv_endda AND endda >= pv_begda. SELECT trfg1 UP TO 1 ROWS FROM hrp1005 INTO st_rep-trfg1 WHERE plvar = '01' AND otype = 'C' AND objid = l_objid AND istat = '1' AND begda <= pv_endda AND endda >= pv_begda. * Get the Pay Scale Group l_objid = st_rep-stell. * Applicant Group IF st_rep-persg = '1'. st_rep-persg = pv_applno <= pv_endda >= pv_begda. ENDIF. IF sy-subrc NE 0. SELECT btrtl UP TO 1 ROWS FROM hrp1008 INTO st_rep-btrtl WHERE plvar = '01' AND otype = 'S' AND objid = l_objid AND istat = '1' AND begda <= pv_endda AND endda >= pv_begda. "get_position_details *&---------------------------------------------------------------------* *& Form get_applicant_data *&---------------------------------------------------------------------* * Get the applicant details *----------------------------------------------------------------------* FORM get_applicant_data USING value(pv_applno) TYPE pb4000-pernr value(pv_begda) TYPE d value(pv_endda) TYPE d. * Get the Employee Group SELECT persg UP TO 1 ROWS FROM pb0001 INTO WHERE pernr AND begda AND endda ENDSELECT. ENDFORM. CLEAR st_rep-btrtl. ENDIF.l_objid = pv_objid.

ENDSELECT.st_rep-slabs) WHERE pernr = pv_applno ORDER BY endda DESCENDING. ELSE. IF sy-subrc NE 0.st_rep-gesch) WHERE pernr = pv_applno AND begda <= pv_endda AND endda >= pv_begda.Last Name and Sex SELECT nachn vorna gesch UP TO 1 ROWS FROM pb0002 INTO (st_rep-nachn. CLEAR: st_rep-nachn. * Get the Educational Establishment Text SELECT SINGLE stext FROM t517t INTO st_rep-edlvl WHERE sprsl = sy-langu AND slart = st_rep-slart. ENDIF.st_rep-vorna. IF sy-subrc NE 0. st_rep-slabs. CLEAR: st_rep-slart. IF sy-subrc NE 0. ENDIF. INTO st_rep-racky = pv_applno <= pv_endda >= pv_begda. * Get the Vacancy Assignment Status Text SELECT SINGLE statx FROM t751b INTO st_rep-statx WHERE langu = sy-langu AND apsta = st_rep-apsta. st_rep-gesch. * Get the Certificate Text SELECT SINGLE stext FROM t519t INTO st_rep-edcert WHERE sprsl = sy-langu AND slabs = st_rep-slabs. CLEAR st_rep-racky. IF sy-subrc NE 0.st_rep-appgrp = 'External'(t01). . CLEAR st_rep-statx. ENDIF. * Get the First Name. ENDIF. IF sy-subrc NE 0. ENDIF. ELSE. st_rep-vorna. *Get the Educational Establishment and Certificate SELECT endda slart slabs UP TO 1 ROWS FROM pb0022 INTO (l_date. CLEAR st_rep-edlvl. ENDIF.st_rep-slart. CLEAR st_rep-edcert. ENDIF. st_rep-appgrp = 'Internal'(t02). ENDSELECT. *Get the Etnic Origin SELECT racky UP TO 1 ROWS FROM pb0077 WHERE pernr AND begda AND endda ENDSELECT. IF sy-subrc NE 0.

* Get the Vacancy Assignment Reason Text SELECT SINGLE reatx FROM t751c INTO st_rep-reatx WHERE langu = sy-langu AND strea = st_rep-strea. " z_get_file_names *&---------------------------------------------------------------------* *& Form get_vacant_pos *&---------------------------------------------------------------------* * Get the vacant positions *----------------------------------------------------------------------* FORM get_vacant_pos . SORT it_pos BY plnobjid. * For each applicant number for a single position * get the following details SORT it_pos DESCENDING BY plnobjid endda. ENDFORM. ENDFORM. IF p_pres = c_true. * Get the Vacancy data for all open positions SELECT objid status begda endda FROM hrp1007 INTO TABLE it_pos WHERE plvar = '01' AND otype = 'S' AND istat = '1' AND status = '0' AND begda <= s_rdate-high AND endda >= s_rdate-low. ENDIF. ELSE. ENDIF. ELSEIF p_appl = c_true. * Get the status for interviewed based on the Applicant Status IF st_rep-apsta = '7' OR st_rep-apsta = '2' OR st_rep-apsta = '6' OR st_rep-apsta = '5' OR st_rep-strea = '21'. ENDIF. "get_applicant_data *&---------------------------------------------------------------------* *& Form z_get_file_names *&---------------------------------------------------------------------* * Get the file names *----------------------------------------------------------------------* FORM z_get_file_names . DELETE ADJACENT DUPLICATES FROM it_pos COMPARING plnobjid. SELECT pernr objid begda endda FROM pb4002 INTO TABLE it_pernr . st_rep-int = 'Y'. st_rep-int = 'N'. PERFORM zget_appl_file_names USING p_logfn p_appfn p_appdir CHANGING g_flag . PERFORM zget_pres_file_names USING p_prefn p_prdir. IF sy-subrc NE 0. * Get filenames (input/output) for Presentation server load. IF NOT it_pos[] IS INITIAL. CLEAR st_rep-reatx.

* MESSAGE e315(zhhr) WITH st_events-endda. * l_date = st_events-endda + 1. * st_events-interface = 'R012'(h13). * st_events-rundate = sy-datum. * ENDIF. * st_events-period = 'Weekly'(h14). ENDIF. * ENDIF. * ENDIF. * SELECT SINGLE * FROM zth_events INTO st_events * WHERE interface = 'R012' * AND filecode = 'C'. * IF NOT p_ovac IS INITIAL. * IF sy-subrc EQ 0. * IF sy-subrc NE 0. SORT it_pernr DESCENDING BY objid pernr begda. ** Last file downloaded for closed vacancy was up to &. *ENDFORM. * MODIFY zth_events FROM st_events. " get_vacant_pos * DK01. * IF s_rdate-low NE l_date. * ENDIF. * IF sy-subrc EQ 0. DELETE ADJACENT DUPLICATES FROM it_pernr COMPARING objid pernr. ENDFORM. * st_events-filecode = 'C'. * DATA : l_date TYPE d. * st_events-runtime = sy-uzeit. . * st_events-filecode = 'O'. * st_events-endda = s_rdate-high. * SELECT SINGLE * FROM zth_events INTO st_events * WHERE interface = 'R012' * AND filecode = 'O'.FOR ALL ENTRIES IN it_pos WHERE otype = 'S' AND objid = it_pos-plnobjid AND begda <= it_pos-endda AND endda >= it_pos-begda. ** ZTH_EVENTS Update Failed for Key &. SORT it_pernr BY objid pernr. * ENDIF. * IF NOT p_ovac IS INITIAL. * MESSAGE e303 WITH st_events. * st_events-begda = s_rdate-low. " update_event *&---------------------------------------------------------------------* *& Form validate_dates *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* *FORM validate_dates . * ENDIF. * IF NOT p_cvac IS INITIAL.Start of Delete *&---------------------------------------------------------------------* *& Form update_event *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* *FORM update_event . * IF NOT p_cvac IS INITIAL.

End of Delete * DK01+ Start of Insert *&---------------------------------------------------------------------* *& Form create_sort *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. ** Last file downloaded for open vacancy was up to &. APPEND st_sort TO it_sort. REFRESH it_sort. " create_sort * DK01+ End of Insert . st_sort-fieldname = 'VACNUM'. CLEAR it_sort.* l_date = st_events-endda + 1. * st_sort-subtot = c_true. ENDFORM. " validate_dates * DK01. * ENDIF. * ENDIF. " Subtotal by Field st_sort-up = c_true.p2 text *----------------------------------------------------------------------* FORM create_sort . * MESSAGE e316(zhhr) WITH st_events-endda. st_sort-tabname = 'IT_REP'. * ENDIF. *ENDFORM. * IF s_rdate-low NE l_date.

Sign up to vote on this title
UsefulNot useful