TYPES: BEGIN OF t_employee,
* INCLUDE STRUCTURE hrms_biw_io_occupancy.
begda TYPE begda,
endda TYPE endda,
pernr TYPE pernr_d,
rfpnr TYPE rfpnr,
bukrs TYPE bukrs,
werks TYPE persa,
btrtl TYPE btrtl,
persg TYPE persg,
persk TYPE persk,
orgeh TYPE orgeh,
stell TYPE stell,
plans TYPE plans,
kokrs TYPE mast_coar,
kostl TYPE mast_cctr,
abkrs TYPE abkrs,
molga TYPE molga,
trfar TYPE trfar,
trfgb TYPE trfgb,
trfkz TYPE trfkz,
trfgr TYPE trfgr,
trfst TYPE trfst,
bsgrd TYPE bsgrd,
ansal TYPE ansal_15,
ancur TYPE ancur,
empct TYPE empct,
stat2 TYPE stat2,
ncsdate TYPE hiredate,
sltyp TYPE p_sltyp,
slreg TYPE p_slreg,
slgrp TYPE p_slgrp,
sllev TYPE p_sllvl,
ansvh TYPE ansvh,
vdsk1 TYPE vdsk1,
sname TYPE smnam,
END OF t_employee.
DATA: it_employee TYPE STANDARD TABLE OF t_employee INITIAL SIZE 0,
wa_employee TYPE t_employee.
TYPES: BEGIN OF t_emptexts,
* INCLUDE STRUCTURE hrms_bw_txt_employee.
DATEFROM TYPE RSDATEFROM,
DATETO TYPE RSDATETO,
PERNR TYPE PERSNO,
TXTMD TYPE EMNAM,
END OF t_emptexts.
DATA: it_emptexts TYPE STANDARD TABLE OF t_emptexts INITIAL SIZE 0,
wa_emptexts TYPE t_emptexts.
TYPES: BEGIN OF t_contract,
* INCLUDE STRUCTURE pa0615.
pernr TYPE p0615-pernr,
begda TYPE p0615-begda,
endda TYPE p0615-endda,
aedtm TYPE p0615-aedtm,
ctype TYPE p0615-ctype,
cbeg TYPE p0615-cbeg,
cend TYPE p0615-cend,
END OF t_contract.
DATA: it_contract TYPE STANDARD TABLE OF t_contract INITIAL SIZE 0,
wa_contract TYPE t_contract.
DATA: it_tabemp TYPE filetable,
gd_subrcemp TYPE i,
it_tabempt TYPE filetable,
gd_subrcempt TYPE i,
it_tabcont TYPE filetable,
gd_subrccont TYPE i.
DATA: gd_downfile TYPE string.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_emp LIKE rlgrap-filename,
p_empt LIKE rlgrap-filename,
p_cont LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK block1.
***********************************************************************
*at selection-screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.
GET pernr.
* Selecting the latest infotype record
rp_provide_from_last p0000 space pn-begda pn-endda.
rp_provide_from_last p0001 space pn-begda pn-endda.
rp_provide_from_last p0007 space pn-begda pn-endda.
rp_provide_from_last p0008 space pn-begda pn-endda.
rp_provide_from_last p0121 space pn-begda pn-endda.
rp_provide_from_last p0615 space pn-begda pn-endda.
MOVE-CORRESPONDING p0001 TO wa_employee.
wa_employee-rfpnr = p0121-rfp01. "?????
MOVE-CORRESPONDING p0007 TO wa_employee.
MOVE-CORRESPONDING p0008 TO wa_employee.
MOVE-CORRESPONDING p0000 TO wa_employee.
SELECT SINGLE molga
FROM t001p
INTO wa_employee-molga
WHERE werks EQ p0001-werks AND
btrtl EQ p0001-btrtl.
SELECT SINGLE trfkz
FROM t503
INTO wa_employee-trfkz
WHERE persg EQ p0001-persg AND
persk EQ p0001-persk.
CALL FUNCTION 'HR_ENTRY_DATE'
EXPORTING
persnr = pernr-pernr
* RCLAS =
* BEGDA = '18000101'
* ENDDA = '99991231'
* VARKY =
IMPORTING
entrydate = wa_employee-ncsdate
* TABLES
* ENTRY_DATES =
EXCEPTIONS
ENTRY_DATE_NOT_FOUND = 1
PERNR_NOT_ASSIGNED = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* append employee data
APPEND wa_employee TO it_employee.
CLEAR: wa_employee.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.