Payroll Infotype
Hi every1,
I need 2 ask u all.......do v need ny configuration for infotype "0580". If Yes den what is tht complete configuration
Thks
Hi,
For India PY :- Infotype 580 is maintained for the Previous Employeers Earnings , Tax , Exemptions,
PF , Ptax
If an employee joines in between the Financial year the Previous employeers details are maintained here
Pls Note If an employee jopines on 01.04 This Infotype will not have any details regarding the Previous earnings, only exemption related to leave enacshment, gratuity exemption will be available
Regards
Hemant V. Mahale
Edited by: Hemant Mahale on Mar 6, 2009 4:42 PM
Similar Messages
-
Retiree Employees, Payroll Infotype Ear.MD change
Dear Team:
Usually, when any change in the master data is done for an employee, the date is updated in the Infotype 0003 in the field Ear. MD Change.
In our scenario, while running payroll it always start from 01.05.2006 even if we change the master data on some other date.
Note: All retiree employees have a Leaving Action record with the date after 10 years from the date of retirement.
If more information is needed, let me know.
Regards
Mallik.Dear Team
Current Scenario
When the payroll administrator runs the payroll for retiree employees, it starts calculting from 05.2006 every month the payroll is run. Even when the infotype 0008 master data is changed, the payroll status infotype 0003 is updating the field of Eearliest Master Data Bonus and not the Ear. MD change field. But after this when payroll is run again, it starts from 05.2006. As there are many retiree employees in the organization, during this payroll run, it is taking too much time to process the same.
Regards
Mallik. -
Authority check in hr payroll infotype report
Hi all,
We have developed a report which gives infotypewise employee details.here we are checking authority for reading employee data.we are applying authority check at selection-screen and while reading the data from database tables.following is the sample code.
do .
if s_abkrs-high < s_abkrs-low.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-high
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc <> 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
exit.
endif.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-low
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc <> 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
s_abkrs-low = s_abkrs-low + 1.
enddo.
my senior says this code is right but it is not checking authority for all infotypes.can anyone suggest what changes are required in this code so that it will check authority for all infotypes.
Thanks in advance.
Regards,
HarshadaHi ,
A select-option will have a structure with four fields (sign , option , low , high) .
So if you want to use your below code : you cannot check authority.
loop at s_abkrs.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs <-- is an internal table
id 'ACTVT' field '01'
id 'ACTVT' field '02'.
if sy-subrc 0.
message id 'ZHR_ERRMSGS' type 'E' number '292' with s_abkrs-low.
endif.
endloop.
The other option is :
If your select option has values only in low ... then you can loop thru it ...
loop at s_abkrs.
authority-check object 'P_PCR'
id 'ABRKS' field s_abkrs-low
endloop.
Regards,
Srini. -
Payroll infotypes disappearing after a client copy
Hi everyone,
Our project team has done a client copy to two new clients (configuration and master data), and then decommissioned the source client. However, for some reason a number of infotypes do not appear against employee records in PA30. The infotype audit log has no record of their deletions (only their creations), and the client copy logs indicate that the expected number of records for the infotype tables was copied to the destination clients.
Has anyone else come across this situation before? I am wondering whether the "missing" infotypes are in the client system and require something further to make them appear, given that the client copy logs indicated nothing out of the ordinary.
Any help or advice would be greatly appreciated.
Cheers
NuwanHi,
The wage type configuration still exist, but the infotypes themselves are "missing"/hidden.
Cheers
Nuwan -
Error in SM35 for RP50G-CCNTR in concurrent employment payroll (infotype 0, 1)
Hi Experts,
I need to perform mass update through BDC session. But employee has multiple assignments (more pernr numbers). From PA40 selection, only Person ID is input field, the assignment field is only selectable. In BDC, I add one item that moving pernr into assignment field (RP50G-CCNTR)
when I run session in background get into the error that “RP50G-CCNTR” is not the input field..
But when I try for foreground or display with error it is working fine without any problem.
Please advise how do I do the mass update for concurrent employment case in background.
Any help would be much appreciated.
Thanks
Balram AdepHi Amit,
Thaks for reply. Amit, I am new to ABAP-HR so i dont know how to use FM "HR_MAINTAIN_MASTERDATA".
Can u please explain in detail.
Thanks
Ziad -
Help Required : Adding new Wagetype to IT 0402 Payroll Results
Dear Experts,
I am adding a new Wagetype to show in Payroll results. At the step of setting up payroll infotypes a workbench request is created. When I transport this request from my Development server to Quality server I get the following error
"Table CI_P0402 could not be activated"
Can anyone please guide me regarding this issue.
Regards,
Talha AftabFor anyone else facing the same issue : You have to make sure the data elements part of CI_P0402, like ZZTELXXXXX are transported as well. They were not automatically part of my transport, which is why it worked fine on my DEV server, but couldn't be activated when I transported to QAS (The data elements are created for each new wagetype when they are added to 0402, and it is set up)
Regards,
Talha Aftab -
How to maintain simulated infotypes
Hi,
I wish to know who maintain simulated infotypes and how can it be done?
Also, i have understood the concepts of payroll n time infotypes for reporting,however dont know how to use the concepts( evaluated wagetypes and simulated infotypes) in sap hr query.
any help / document/ blog link would be grt.
Many thanks
KavitaHi KAvita,
You cant maintain any simulated infotypes in PA30.
For payroll infotype before you can use thenm in infoset query you have to run the Report RPABRI00
Still Not getting please let me know.
Warm Regards,
Kapil Kaushal -
Hi folks,
want to capture payroll result in the master data and then to an adhoc query. Found an infotype Payroll Result (0402) and tried configuring the same in Personnel Management -> Human Resources Information System -> Payroll Results.
In step 1: Define Evaluation Wage Types
have maintained one entry /560 with Amount selected.
In step 2: Assign Wage Types
have maintained one entry of /560 as eval WT and /560 as corresponding WTyp.
In step 3 : Set Up Payroll Infotypes
have maintained 0402 for country grp 40 with Active / Generated Check which contains one entry of /560.
In step 4: Set Up Assignment to Payroll
have maintained 0402 with Active status.
While preparing the adhoc query, could see a Zfield made by the system for capturing result of /560.
Ran payroll for the employees and still this infotype has 0 records.
Tried doing through RPABRI00 report with no success.
Can someone please help me with this asap.
Thanks in Advance !
Cheers !
JackHI
I think you can also fix cells in the interactive planning. Once user executed the forecast at lower level. They can fix the cell for particular KF. I think once you Fix the cell the values from the KF will not get changed.
I think you can also fix cells using macro. All you need to do is define a simple
macro with singe step and copy "Values" to "Fixed values" of the same
key figure. This you define in "Change of scope" of result row
attribute.
Thanks
Amol -
PA30 Initial Screen - need to take off /delimet infotype menu group
Hi All,
If i want to take off / delimit infotype menu group from PA30 screen ( for example - I dont want user to see Gorss/net payroll and Net Payroll infotype tabs)
can any one please guide me how to do that?
Regards,
AmitManu,
Well.... even after checking off the user dependency for some of infotypes, i can still see them on pa30 screen,,?
So i was wondering if there some more steps to be done?
Regards,
Amit -
LOGICAL DATABASE IN HR ABAP PRPGRAMMING
Hi Friends,
what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
regards,
vijay.hi
HR Logical Databases
In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
PNP (PNPCE)
PAP
PCH
By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
Logical Database PCH
This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
Logical Database PNP (or PNPCE)
Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
Reporting on working time and planned compensation for a position that an employee occupies
Reporting on the validity and proficiency of a qualification that an employee fulfils
From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
Logical Database PAP
Logical database PAP enables you to access data from Recruitment.
regards
navjot
reward if helpfull -
We did a client copy from Prod to Dev. Now the HR data is in Dev client. Dev client use to be the playground for our IT staffs to do development and testing with SAP_ALL access.
Do you think it is a risk and we should remove the SAP_ALL from IT staffs?
Please share how your manage this in your organisation. TQ.Hi
If you think k in the near future some of your processes will be moved to production and you r not 100% live on the producton system at present than no need to deleate the data only deleate the data related to the salaries like IT- 0008, 0014, 0015, 0045 etc payroll infotypes data because all this is a sensitive and confidential information.
This is so because in near future you need to provide some test cases or test data to user. Or user have to create the new one.
Thanks
Sheetal -
Hai all, where can i get help on HR-ABAP coding. And interview questions on hr-abap
pls send links to my mail id
[email protected]
thanks
ushaHi usha
http://www.planetsap.com/hr_abap_main_page.htm
HR ABAP
Logical Database (PNP)
Programming with Infotypes
Processing Time infotypes/Cluster
Processing Payroll infotypes/Cluster
Best Regards
Wiboon -
HR transactions and functionality and creation of Database view
Hi Guys
I am new to HR module . can anybody send me the list of transaction codes with HR functionalities.
I also have to made a database view from hrp1001 and hrp1010 table to list all chief positions who are head of business group , Business unit , Site etc .
Could you help me in creating this databse view.Hi,
These are HR Infotypes
0000 Events
0001 Org assignment
0002 Personal info
0003 Payroll data
0007 Work time
0008 Basic pay
0014 Reoccurring pay
0015 1 X pay
0027 Cost Center
0041 Event Dates
0057 Membership dues
0165 Over ride to limits on deductions
0167 Health
0168 Insurance
0169 Savings
0170 Spending
0194 Garnishment reduction
0195 Garnishment order
0207 Residence Tax
0208 Work Tax
0209 Unemployment Tax
0210 Withholding
0216 Garnishment adjustment
0221 Adjustment
0267 Off cycle
2005 OT
2010 Catts direct to cluster
1000 Infotypes 1000 1999 are PD Relationship infotypes
Logical Database (PNP) ·
Programming with Infotypes ·
Processing Time infotypes/Cluster ·
Processing Payroll infotypes/Cluster
In OM level hrp 1001 and 1010 will be there.
If u want total transactions goto SE11->TSTC Table.
****POINTS TO BE CONSIDERD
Thanks
P.SRIKANTH -
HR BDC updates Infty 40 and 15 in Quality but only Infty 40 in production.
Hi SDNers,
I am facing a peculiar problem . I have a program which updates infotype 0040 and thereafter Infotype 0015 with the remaining amount value for a employee card when the employee is doing his settlement post-resignation . This program works absolutely fine in Quality and Test system and updates both infotypes bbut in production , it updates infotype 0040 only .Here is the program given below.
I have debugged and analyzed various scenarios in dev. and quality where it works fine
- Running BDC after resignation action
- Locking the payroll area for which the employee belongs .I had a hunch that BAPI_EMPLOYEE_ENQUEUE would be giving a non-zero return message since the payroll area of the employee is locked and therefore ; the program might not be going to the Infotype 0015 update loop . However, I got no error in quality and dev. for the same.
Please let me know the solution . Points are assured for helpful as well as correct solution.
*& Report ZRHRBDC *
REPORT ZRHRBDC
NO STANDARD PAGE HEADING LINE-SIZE 255.
**************Includes And Types****************
INCLUDE <icon>.
TABLES: t100.
*include bdcrecx1.
TYPE-POOLS: slis.
TABLES: zhr_loan_obj,zhr_loan_stat.
**************Data Declaration***************
DATA: itab_alv_fieldcat TYPE slis_t_fieldcat_alv,
itab_alv_layout TYPE slis_layout_alv,
itab_lt_sort TYPE slis_t_sortinfo_alv,
itab_ls_sort TYPE slis_sortinfo_alv,
v_stru_disvar TYPE disvariant,
v_header TYPE slis_listheader,
v_t_header TYPE slis_t_listheader,
v_ld_lines TYPE i,
v_t_line LIKE v_header-info,
v_ld_linesc(10) TYPE c.
DATA: v_tcode LIKE sy-tcode.
DATA: v_lin(6).
DATA: v_lin1(6).
DATA: v_lin2(6).
DATA: v_path(3) TYPE c VALUE 'C:\'.
DATA: v_mask(6) TYPE c VALUE ',.,.'.
DATA: v_mode(1) TYPE c VALUE 'O'.
****************Internal Table************
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA: itab_msgtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
DATA: itab_up_data LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
DATA: fieldtab TYPE slis_t_fieldcat_alv.
DATA: BEGIN OF itab_rec_data OCCURS 0,
pernr(8),
lobnr(20),
zz_reason(20),
zz_status(20),
zz_remain(10),
stat(1),
mstring(480),
END OF itab_rec_data.
DATA: BEGIN OF st_display,
pernr LIKE p0001-pernr,
lobnr LIKE p0040-lobnr,
zz_reason LIKE zhr_loan_obj-description,
zz_status LIKE zhr_loan_stat-description,
zz_remain LIKE p0040-zz_depositamt,
stat(4),
etype TYPE bdcmsgcoll-msgtyp,
mstring(480),
END OF st_display.
DATA: itab_display LIKE st_display OCCURS 0 WITH HEADER LINE,
itab_display_suc LIKE st_display OCCURS 0 WITH HEADER LINE,
itab_display_err LIKE st_display OCCURS 0 WITH HEADER LINE.
DATA: v_ucomm LIKE sy-ucomm.
***********Selection Screen****************
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: filename LIKE rlgrap-filename.
PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'N'.
PARAMETERS: cupdate LIKE ctu_params-updmode DEFAULT 'S' NO-DISPLAY.
"S: synchronously
"A: asynchronously
"L: local
PARAMETERS: nodata DEFAULT '/' LOWER CASE NO-DISPLAY.
SELECTION-SCREEN: END OF BLOCK b1.
PARAMETERS: p_test AS CHECKBOX DEFAULT 'X'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
PERFORM getfile_f4help.
INITIALIZATION.
ctu = 'X'.
v_tcode = 'PA30'.
*****************Start of Selection***********
START-OF-SELECTION.
PERFORM status_indicator.
PERFORM upload_data."To upload data
IF p_test IS INITIAL.
PERFORM bdc_update. "To perform bdc
ENDIF.
END-OF-SELECTION.
PERFORM process_display.
PERFORM fieldcat_init.
PERFORM display_report.
*& Form upload_data
FORM upload_data .
****To Upload the data
DATA : wrk_pcfile TYPE string.
IF sy-batch = 'X'.
MESSAGE e000(ztibs) WITH text-007.
ENDIF.
MOVE filename TO wrk_pcfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = wrk_pcfile
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = itab_rec_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE e000(zhr) WITH text-005.
ENDIF.
IF itab_rec_data[] IS INITIAL.
MESSAGE e000(zhr) WITH text-006 .
ENDIF.
ENDFORM. " upload_data
*& Form bdc_update
text
--> p1 text
<-- p2 text
FORM bdc_update .
DATA: p0040 LIKE p0040 OCCURS 0 WITH HEADER LINE,
p0015 LIKE p0015 OCCURS 0 WITH HEADER LINE,
l_return LIKE bapireturn1,
l_pernr LIKE p0040-pernr,
l_begda(10),
l_endda(10).
DATA: options TYPE ctu_params.
CLEAR options .
options-dismode = ctumode.
options-updmode = cupdate.
options-cattmode = ' '.
options-defsize = 'X'.
options-racommit = 'X'.
options-nobinpt = ' '.
options-nobiend = ' '.
LOOP AT itab_rec_data.
REFRESH: bdcdata, itab_msgtab.
IF itab_rec_data-zz_status = '01' " Issued
OR itab_rec_data-zz_status = '03' " Worn Out
OR itab_rec_data-zz_status = '05'. " Employee left
REFRESH: p0040.
MOVE itab_rec_data-pernr TO l_pernr.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = l_pernr
infty = '0040'
TABLES
infty_tab = p0040
EXCEPTIONS
infty_not_found = 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.
IF p0040[] IS INITIAL.
MOVE: 'E' TO itab_rec_data-stat.
text-e02 TO itab_rec_data-mstring.
MOVE: itab_rec_data-pernr TO itab_display_err-pernr,
itab_rec_data-lobnr TO itab_display_err-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display_err-zz_remain,
text-e03 TO itab_display_err-mstring.
itab_display_err-etype = 'E'.
APPEND itab_display_err.
CLEAR: itab_display_err.
MODIFY itab_rec_data TRANSPORTING stat. " mstring.
ENDIF.
DELETE p0040 WHERE ( subty NE '9021' AND subty NE '9023' ).
IF p0040[] IS INITIAL.
MOVE: 'E' TO itab_rec_data-stat.
text-e02 TO itab_rec_data-mstring.
MOVE: itab_rec_data-pernr TO itab_display_err-pernr,
itab_rec_data-lobnr TO itab_display_err-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display_err-zz_remain,
text-e04 TO itab_display_err-mstring.
itab_display_err-etype = 'E'.
APPEND itab_display_err.
CLEAR: itab_display_err.
MODIFY itab_rec_data TRANSPORTING stat. " mstring.
ENDIF.
LOOP AT p0040 WHERE lobnr = itab_rec_data-lobnr.
CONCATENATE p0040-begda6(2) '.' p0040-begda4(2) '.'
p0040-begda(4) INTO l_begda.
CONCATENATE p0040-endda6(2) '.' p0040-endda4(2) '.'
p0040-endda(4) INTO l_endda.
SELECT SINGLE * FROM zhr_loan_obj
WHERE reasoncode = itab_rec_data-zz_reason.
SELECT SINGLE * FROM zhr_loan_stat
WHERE statuscode = itab_rec_data-zz_status.
PERFORM bdc_dynpro USING 'SAPMP50A' '1000'.
PERFORM bdc_field USING 'RP50G-PERNR'
p0040-pernr.
PERFORM bdc_field USING 'RP50G-BEGDA'
l_begda.
PERFORM bdc_field USING 'RP50G-ENDDA'
l_endda.
PERFORM bdc_field USING 'RP50G-CHOIC'
'0040'.
PERFORM bdc_field USING 'RP50G-SUBTY'
p0040-subty.
PERFORM bdc_field USING 'BDC_OKCODE'
'=MOD'.
PERFORM bdc_dynpro USING 'MP004000' '2000'.
PERFORM bdc_field USING 'P0040-ZZ_REASON'
zhr_loan_obj-description.
PERFORM bdc_field USING 'P0040-ZZ_STATUS'
zhr_loan_stat-description.
PERFORM bdc_field USING 'P0040-ZZ_REMAIN'
itab_rec_data-zz_remain.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'MP004000' '2000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPD'.
CALL TRANSACTION v_tcode USING bdcdata
OPTIONS FROM options
MODE ctumode
UPDATE cupdate
MESSAGES INTO itab_msgtab.
IF sy-subrc = 0. "Success
MOVE: 'S' TO itab_rec_data-stat.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = l_pernr
IMPORTING
return = l_return.
IF sy-subrc NE 0.
MOVE: 'E' TO itab_rec_data-stat.
PERFORM process_list USING itab_rec_data-stat.
ELSE.
p0015-pernr = l_pernr.
p0015-subty = '6004'.
p0015-infty = '0015'.
p0015-begda = sy-datum.
p0015-endda = sy-datum.
p0015-betrg = itab_rec_data-zz_remain.
p0015-aedtm = sy-datum.
p0015-uname = sy-uname.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0015'
number = l_pernr
subtype = '6004'
validityend = sy-datum
validitybegin = sy-datum
record = p0015
operation = 'INS'
tclas = 'A'
dialog_mode = '1'
nocommit = 'X' "nocommit
IMPORTING
return = l_return
EXCEPTIONS
OTHERS = 0.
IF sy-subrc = 0.
COMMIT WORK.
MOVE: 'S' TO itab_rec_data-stat.
PERFORM process_list USING itab_rec_data-stat.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = l_pernr
IMPORTING
return = l_return.
ENDIF.
ELSE. "Error
MOVE: 'E' TO itab_rec_data-stat.
PERFORM process_list USING itab_rec_data-stat.
ENDIF.
PERFORM move_msgdata CHANGING itab_rec_data-stat
itab_rec_data-mstring.
IF itab_rec_data-stat = 'S'. " no errors found.
create infotype 0015
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = l_pernr
IMPORTING
return = l_return.
IF l_return-type = 'E'.
MOVE l_return-message TO itab_rec_data-mstring.
ELSE.
p0015-pernr = l_pernr.
p0015-subty = '6004'.
p0015-infty = '0015'.
p0015-begda = sy-datum.
p0015-endda = sy-datum.
p0015-betrg = itab_rec_data-zz_remain.
p0015-aedtm = sy-datum.
p0015-uname = sy-uname.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0015'
number = l_pernr
subtype = '6004'
validityend = sy-datum
validitybegin = sy-datum
record = p0015
operation = 'INS'
tclas = 'A'
dialog_mode = '1'
nocommit = 'X' "nocommit
IMPORTING
return = l_return
EXCEPTIONS
OTHERS = 0.
IF sy-subrc = 0.
COMMIT WORK.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = l_pernr
IMPORTING
return = l_return.
ENDIF.
ENDIF.
MODIFY itab_rec_data TRANSPORTING stat. " mstring.
CLEAR: l_begda, l_endda.
ENDLOOP.
IF sy-subrc <> 0.
MOVE: 'E' TO itab_rec_data-stat.
text-e02 TO itab_rec_data-mstring.
MOVE: itab_rec_data-pernr TO itab_display_err-pernr,
itab_rec_data-lobnr TO itab_display_err-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display_err-zz_remain,
text-e02 TO itab_display_err-mstring.
itab_display_err-etype = 'E'.
APPEND itab_display_err.
CLEAR: itab_display_err.
MODIFY itab_rec_data TRANSPORTING stat. " mstring.
ENDIF.
ELSE.
MOVE: 'E' TO itab_rec_data-stat,
text-e01 TO itab_rec_data-mstring.
MODIFY itab_rec_data TRANSPORTING stat mstring.
ENDIF.
CLEAR: itab_rec_data.
ENDLOOP.
ENDFORM. " bdc_update
*& Form getfile_f4help
text
--> p1 text
<-- p2 text
FORM getfile_f4help .
****for upload file path.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = v_path
mask = v_mask
mode = v_mode
IMPORTING
filename = filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " getfile_f4help
*& Form fieldcat_init
text
--> p1 text
<-- p2 text
FORM fieldcat_init .
REFRESH itab_alv_fieldcat.
IF sy-ucomm NE '&REJECT' AND sy-ucomm NE '&SUCCESS'.
PERFORM fieldcat_write USING 'STAT' 'Status' space space 'X'.
ENDIF.
PERFORM fieldcat_write USING 'PERNR' 'Personnel No.' space
space space.
PERFORM fieldcat_write USING 'LOBNR' 'CSC ID' space space space.
PERFORM fieldcat_write USING 'ZZ_REASON' 'Reason' space space space.
PERFORM fieldcat_write USING 'ZZ_STATUS' 'Status' space space space.
PERFORM fieldcat_write USING 'ZZ_REMAIN' 'RV confirmed by TL'
space space space.
IF sy-ucomm = '&REJECT'.
PERFORM fieldcat_write USING 'ETYPE' 'Error Type' space space space.
PERFORM fieldcat_write USING 'MSTRING' 'Error Message' space space
space.
ENDIF.
ENDFORM. " fieldcat_init
*& Form fieldcat_write
text
-->field text
-->label text
-->key text
FORM fieldcat_write USING field
label
key
sum
icon.
DATA: l_alv_fieldcat TYPE slis_fieldcat_alv.
l_alv_fieldcat-fieldname = field.
l_alv_fieldcat-seltext_l = label.
l_alv_fieldcat-key = key.
l_alv_fieldcat-do_sum = sum.
l_alv_fieldcat-icon = icon.
APPEND l_alv_fieldcat TO itab_alv_fieldcat.
ENDFORM. " fieldcat_write
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form display_report
text
--> p1 text
<-- p2 text
FORM display_report .
itab_alv_layout-colwidth_optimize = 'X'.
itab_alv_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'ALV_HEADER'
is_layout = itab_alv_layout
it_fieldcat = itab_alv_fieldcat
it_sort = itab_lt_sort
is_variant = v_stru_disvar
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab_display
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.
ENDFORM. " display_report
*& Form alv_header
text
--> p1 text
<-- p2 text
FORM alv_header .
CLEAR: v_t_header.
MOVE sy-ucomm TO v_ucomm.
IF sy-ucomm = '&SUCCESS'.
v_header-typ = 'H'.
v_header-info = text-015.
APPEND v_header TO v_t_header.
CLEAR v_header.
v_header-typ = 'S'.
v_header-key = 'Success List'.
v_header-info = sy-repid.
APPEND v_header TO v_t_header.
CLEAR: v_header.
ELSEIF sy-ucomm = '&REJECT'.
v_header-typ = 'H'.
v_header-info = text-017.
APPEND v_header TO v_t_header.
CLEAR v_header.
v_header-typ = 'S'.
v_header-key = 'Error List'.
v_header-info = sy-repid.
APPEND v_header TO v_t_header.
CLEAR: v_header.
ELSE.
v_header-typ = 'H'.
v_header-info = text-016.
APPEND v_header TO v_t_header.
CLEAR v_header.
ENDIF.
Title
v_header-typ = 'H'.
v_header-info = 'Upload Program To Update Infotype 0040'.
APPEND v_header TO v_t_header.
CLEAR v_header.
Date
v_header-typ = 'S'.
v_header-key = 'Date / Time'.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) ' / '
sy-uzeit(2) ':'
sy-uzeit+2(2) ':'
sy-uzeit+4(2) INTO v_header-info. "todays
APPEND v_header TO v_t_header.
CLEAR: v_header.
*Program Name
v_header-typ = 'S'.
v_header-key = 'Program:'.
v_header-info = sy-repid.
APPEND v_header TO v_t_header.
CLEAR: v_header.
Run by
v_header-typ = 'S'.
v_header-key = 'Run by:'.
v_header-info = sy-uname.
APPEND v_header TO v_t_header.
CLEAR: v_header.
CASE v_ucomm.
WHEN '&ALLREC'.
v_header-typ = 'S'.
v_header-key = 'Records:'.
v_header-info = 'All'.
APPEND v_header TO v_t_header.
CLEAR: v_header.
DESCRIBE TABLE itab_display LINES v_ld_lines.
v_ld_linesc = v_ld_lines.
CONCATENATE 'Total No. of Records: ' v_ld_linesc
INTO v_t_line SEPARATED BY space.
v_header-typ = 'A'.
v_header-info = v_t_line.
APPEND v_header TO v_t_header.
CLEAR: v_header, v_t_line.
WHEN '&SUCCESS'.
v_header-typ = 'S'.
v_header-key = 'Records:'.
v_header-info = 'Successful'.
APPEND v_header TO v_t_header.
CLEAR: v_header.
DESCRIBE TABLE itab_display_suc LINES v_ld_lines.
v_ld_linesc = v_ld_lines.
CONCATENATE 'Total No. of Successful Records: ' v_ld_linesc
INTO v_t_line SEPARATED BY space.
v_header-typ = 'A'.
v_header-info = v_t_line.
APPEND v_header TO v_t_header.
CLEAR: v_header, v_t_line.
WHEN '&REJECT'.
v_header-typ = 'S'.
v_header-key = 'Records:'.
v_header-info = 'Rejected'.
APPEND v_header TO v_t_header.
CLEAR: v_header.
DESCRIBE TABLE itab_display_err LINES v_ld_lines.
v_ld_linesc = v_ld_lines.
CONCATENATE 'Total No. of Rejected Records: ' v_ld_linesc
INTO v_t_line SEPARATED BY space.
v_header-typ = 'A'.
v_header-info = v_t_line.
APPEND v_header TO v_t_header.
CLEAR: v_header, v_t_line.
WHEN OTHERS.
v_header-typ = 'S'.
v_header-key = 'Records:'.
v_header-info = 'All'.
APPEND v_header TO v_t_header.
CLEAR: v_header.
DESCRIBE TABLE itab_display LINES v_ld_lines.
v_ld_linesc = v_ld_lines.
CONCATENATE 'Total No. of Records: ' v_ld_linesc
INTO v_t_line SEPARATED BY space.
v_header-typ = 'A'.
v_header-info = v_t_line.
APPEND v_header TO v_t_header.
CLEAR: v_header, v_t_line.
ENDCASE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = v_t_header.
ENDFORM. " alv_header
*& Form SET_PF_STATUS
text
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STATUS' EXCLUDING rt_extab.
REFRESH: rt_extab.
IF p_test = 'X'.
APPEND '&ALLREC' TO rt_extab.
APPEND '&SUCCESS' TO rt_extab.
APPEND '&REJECT' TO rt_extab.
ENDIF.
SET PF-STATUS 'STATUS' EXCLUDING rt_extab.
ENDFORM. "SET_PF_STATUS
*& Form SET_PF_STATUS
text
FORM set_pf_status_s USING rt_extab TYPE slis_t_extab.
REFRESH: rt_extab.
IF p_test = 'X'.
APPEND '&ALLREC' TO rt_extab.
APPEND '&SUCCESS' TO rt_extab.
APPEND '&REJECT' TO rt_extab.
ENDIF.
SET PF-STATUS 'STATUS_SUCC' EXCLUDING rt_extab.
ENDFORM. "SET_PF_STATUS
*& Form SET_PF_STATUS
text
FORM set_pf_status_e USING rt_extab TYPE slis_t_extab.
REFRESH: rt_extab.
IF p_test = 'X'.
APPEND '&ALLREC' TO rt_extab.
APPEND '&SUCCESS' TO rt_extab.
APPEND '&REJECT' TO rt_extab.
ENDIF.
SET PF-STATUS 'STATUS_ERROR' EXCLUDING rt_extab.
ENDFORM. "SET_PF_STATUS
*& Form user_command
text
-->R_UCOMM text
-->RS_SELFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
itab_alv_layout-colwidth_optimize = 'X'.
itab_alv_layout-zebra = 'X'.
v_ucomm = r_ucomm.
CASE r_ucomm.
WHEN '&ALLREC'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'ALV_HEADER'
is_layout = itab_alv_layout
it_fieldcat = itab_alv_fieldcat
it_sort = itab_lt_sort
is_variant = v_stru_disvar
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab_display
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
WHEN '&SUCCESS'.
REFRESH itab_display_suc.
itab_display_suc[] = itab_display[].
DELETE itab_display_suc WHERE stat <> icon_green_light.
PERFORM fieldcat_init.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS_S'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'ALV_HEADER'
is_layout = itab_alv_layout
it_fieldcat = itab_alv_fieldcat
it_sort = itab_lt_sort
is_variant = v_stru_disvar
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab_display_suc
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
WHEN '&REJECT'.
REFRESH itab_display_err.
itab_display_err[] = itab_display[].
DELETE itab_display_err WHERE stat <> icon_red_light.
PERFORM fieldcat_init.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS_E'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'ALV_HEADER'
is_layout = itab_alv_layout
it_fieldcat = itab_alv_fieldcat
it_sort = itab_lt_sort
is_variant = v_stru_disvar
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = itab_display_err
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDCASE.
ENDFORM. "user_command
text
--> p1 text
<-- p2 text
FORM move_msgdata CHANGING p_stat p_mstring.
DATA: l_mstring(255).
CLEAR: p_stat, p_mstring.
LOOP AT itab_msgtab WHERE msgtyp = 'E'.
SELECT SINGLE * FROM t100 WHERE sprsl = itab_msgtab-msgspra
AND arbgb = itab_msgtab-msgid
AND msgnr = itab_msgtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH itab_msgtab-msgv1 INTO p_mstring.
REPLACE '&2' WITH itab_msgtab-msgv2 INTO p_mstring.
REPLACE '&3' WITH itab_msgtab-msgv3 INTO p_mstring.
REPLACE '&4' WITH itab_msgtab-msgv4 INTO p_mstring.
ELSE.
REPLACE '&' WITH itab_msgtab-msgv1 INTO p_mstring.
REPLACE '&' WITH itab_msgtab-msgv2 INTO p_mstring.
REPLACE '&' WITH itab_msgtab-msgv3 INTO p_mstring.
REPLACE '&' WITH itab_msgtab-msgv4 INTO p_mstring.
ENDIF.
CONDENSE l_mstring.
CONCATENATE p_mstring l_mstring INTO p_mstring SEPARATED BY space.
ENDIF.
CLEAR: itab_msgtab, l_mstring.
ENDLOOP.
IF sy-subrc = 0.
CONDENSE p_mstring.
p_stat = 'E'.
ELSE.
p_stat = 'S'.
ENDIF.
ENDFORM. " move_msgdata
*& Form process_display
text
--> p1 text
<-- p2 text
FORM process_display .
LOOP AT itab_rec_data.
MOVE: itab_rec_data-pernr TO itab_display-pernr,
itab_rec_data-lobnr TO itab_display-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display-zz_remain,
itab_rec_data-mstring TO itab_display-mstring.
CASE itab_rec_data-stat.
WHEN 'S'.
MOVE icon_green_light TO itab_display-stat.
WHEN 'E'.
MOVE icon_red_light TO itab_display-stat.
WHEN OTHERS.
MOVE icon_yellow_light TO itab_display-stat.
ENDCASE.
APPEND itab_display.
CLEAR: itab_rec_data, itab_display.
ENDLOOP.
ENDFORM. " process_display
*& Form status_indicator
text
--> p1 text
<-- p2 text
FORM status_indicator .
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = 50
text = text-s11.
ENDFORM. " status_indicator
*& Form process_list
text
-->P_STAT text
FORM process_list USING p_stat.
DATA: v_info LIKE einfo.
DATA: st_return LIKE bapireturn.
CASE p_stat.
WHEN 'S'.
MOVE: itab_rec_data-pernr TO itab_display_suc-pernr,
itab_rec_data-lobnr TO itab_display_suc-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display_suc-zz_remain,
itab_rec_data-mstring TO itab_display_suc-mstring.
APPEND itab_display_suc.
CLEAR itab_display_suc.
WHEN 'E'.
LOOP AT itab_msgtab.
MOVE: itab_rec_data-pernr TO itab_display_err-pernr,
itab_rec_data-lobnr TO itab_display_err-lobnr,
itab_rec_data-zz_reason TO itab_display-zz_reason,
itab_rec_data-zz_status TO itab_display-zz_status,
itab_rec_data-zz_remain TO itab_display_err-zz_remain.
CLEAR v_info.
v_info-msgid = itab_msgtab-msgid.
v_info-msgty = itab_msgtab-msgtyp.
itab_display_err-etype = itab_msgtab-msgtyp.
v_info-msgno = itab_msgtab-msgnr.
v_info-msgv1 = itab_msgtab-msgv1.
v_info-msgv2 = itab_msgtab-msgv2.
v_info-msgv3 = itab_msgtab-msgv3.
v_info-msgv4 = itab_msgtab-msgv4.
CALL FUNCTION 'MESSAGE_GET_TEXT'
EXPORTING
ieinfo = v_info
ilangu = 'E'
IMPORTING
etext = st_return-message
EXCEPTIONS
no_t100_found = 1
OTHERS = 2.
itab_display_err-mstring = st_return-message.
APPEND itab_display_err.
CLEAR: itab_display_err.
ENDLOOP.
ENDCASE.
ENDFORM. "process_listHi,
R U working without the functional, see once you lock the payroll area then you cant update Payroll Infotypes...as you have in production it is locked hence you cant update infotype 15. I guess the payroll area is not locked in Dev and Quality therefor it allows you to update infotype 15.
Do one thing create a function module in update task to update infotype 40 and 15.. hence it will take care of updating both the infotype together.. or else not.
Regards,
Bhawanidutt. -
Hi All,
I'm new in ABAP HR and want to clear some doubts till now according to my knowlege PA30 is the Tcode to maintain HR Master Data.. like the PA,Benefits,Time & Payroll Infotypes can all be mainatined via this Trx.. and database tables could be from PA0000 thru PA9999.. the 9000 series being the Custom Infotypes"
So My doubts are..
1-Each infotype like infotype 0001 , 0002 all realted data is maintained in data base table like PA0001....PA0033...?
2- If user has any Authorization Restriction LIke P_ORIGIN for Personnel area and users are not able to view employee data from other personal areas. so will this restriction also works for same user in case of related infotype data tables( in se11) like in PA0001....00045.
Regards,
Anuj jainHello
Here's the answers for your questions
1) Yes for Employee data. But for Applicants the tables will be PB0001, PB0002 ....
2) Not sure what exactly is your questions here. If you intend to know whether users can view data of other employees not under his/her authorizations profile through SE11, yes that is possible. HR structural auth. is only dependant at the transactional level.
- Ranganath
Maybe you are looking for
-
Chmsee will not open chm files.
I have 3 seperate chm files, I've tried opening them using chmsee, everytime I try and open or view the chm file this is all that shows up each time. Mammon slept. And the beast reborn spread over the earth and its numbers grew legion. And they procl
-
How do I move projects created in Elements 9 to a new PC running Elements 11?
-
I have a form that is submitting a pdf through email. Usage rights are enabled. When I hit submit I get an error. The operation failed. Any ideas?
-
Real Application Cluster (RAC) & Cluster Suite
Redhat Cluster Suite can create n-node server clusters, load balances incoming IP network requests and supports up to 16 nodes. So, do I need to configure RAC if I'm going to use Redhat Cluster Suite?
-
Just a question: does anyone ever faced a problem while doing a "pacman -Syu"? It happened several times on my box that this command froze completly my system, just after having retrieved the database for the "current" repository. When the problem oc