Reading absences from payroll results
hello everybody,
i have to develop a report which shows the absences per month for each person.
we store the absences usually in the table pa2001, but there we've got only one entrie per absence.
i need a possibility to get the absences per month.
after starting the report PC_PAYRESULT i've recognized that there is a table named "AB" where these absences stored,
but i cannot read them in my program, i don't know how to do this.
can anybody help me in this case?
thanks for further information
holger
good morning everybody,
i've done all the things you suggest
but everytime i get the following error by calling the function PYXX_READ_PAYROLL_RESULT
exactly by calling this subroutine:
PERFORM import_result IN PROGRAM (subroutine_pool-name)
USING key
payroll_result
import_subrc
pcl2_version_number
typepool_version_number
-->Der Aufruf der FORM "IMPORT_RESULT" ist nicht korrekt:
Der Aktualparameter Nr. 2 hat beim PERFORM nicht den Typ, der von
der FORM "IMPORT_RESULT" im Programm "%_T00M90" verlangt wird.<--
that means that the actual paramter nr 2 (payroll_result) has another type declaration than expected
but it doesn't matter how i define this parameter - i try it as TYPE string - as TYPE pay99_result - as TYPE ref to pay99_result ...
Edited by: Holger Schmelzle on May 20, 2010 8:44 AM
Similar Messages
-
Extractor for payroll reads data from cluster PCL2?
Hello all,
This is the line from help.sap in payroll extractor.
"The extractor for payroll results reads data from payroll cluster PCL2, not from standard tables."
Can someone explain to me what do we have to understand from that, and where in R/3 do we have to go and check for data.
Thanks in advance.Anytime some of last information does not upload in delta to BW from payroll because payroll has a process to close it had to be executed (or something like that (sorry, i haven't enough funcional HR knoledge), it happened to me anytime).
But, surely the user that you are using for extraction has no enought rights or authorizations.
Look at these notes
397208 **** very important!!!
672514
964569
329961
585682 -
Reading a string containing special character from a result set
My Code....
PrintStream p = new PrintStream(fout);
if (connection == null)
connection = getConnection();
CallableStatement proc = connection.prepareCall("{call testing_read()}");
rs = proc.executeQuery();
while ( rs.next() )
String page2 = rs.getString(1);
System.out.println(page2);
rs.getString(1); is a string value eg. 'Rebekah \n Govender' that is being set in a stored procedure.
The output of my program is :'Rebekah \n Govender' , i need for it to read the special characters, and produce this output :
Rebekah
Govender
Without using a result set , it works fine.
eg.
String page2 = 'Rebekah \n Govender'
System.out.println(page2);
Will give an output of :
Rebekah
Govender
I need to read values from the results set, pls help me someone....
Please help....String page2 = rs.getString(1).replace("\\n", "\n"); When you include source code in your posts, please enclose it in CODE tags. There's a button for that above the input textarea.
ThE-MaRaC wrote:
Hi,
you can try something like this:
import java.io.UnsupportedEncodingException;;
* Main class, manages the complete game
public class Main {
public static void main(String[] args) {
String page2 = "Rebekah \n Govender";
try {
page2 = new String(page2.getBytes("ISO-8859-1"), "ETF-8");
} catch (UnsupportedEncodingException e) {}
System.out.println(page2);
}Regards,
Hercog MarioThat is a disgusting hack which you shouldn't be recommending to anyone, and it's totally irrelevant here anyway. Also, as written, it does absolutely nothing because you misspelled "UTF-8" and you swallowed the exception that would have told you so. -
Reading payroll results for an employee from ABAP-HR?
Hi,
I dont know whether i must post this question in this category ? but i had a problem in reading of the payroll data for employees.
I used the function of PYXX_READ_PAYROLL_RESULT and passed the PERNR(employee number), SEQNR, RELID(clusterid) for a given period of say PN-BEGDA AND PN-ENDDA. And i took the payroll structure of germany (its PAYDE_RESULT). program is showing the exceptions since between the selected periods i had many different country employees other than germany DE. how can i solve that problem ? if i use PAY99_RESULT then i cant read the National wage types? how to solve this problem?
which function i must use so that i must get all the payroll data of the employees between the given period with inter/national payroll details and also which structure(like PAYDE_RESULT) i must use for holding the payroll data that is unique?
please help me.
***Ratings are must for a possible answer.Hi KK,
In this sample code...you will find the use of the method i meantioned.
REPORT zgratuity_ipcl MESSAGE-ID zh.
TABLES : pernr , pa0001, pa0008 , pa0000 , t569v.
TYPE-POOLS: slis.
CONSTANTS:
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
INFOTYPES: 0008 ,0001,0002,0000.
DATA : period(6),
pay_period(6),
c_period(6).
DATA: number LIKE pc261-seqnr.
DATA : refdt LIKE p0000-begda.
DATA: ason_yr LIKE p0347-scryy,
ason_mon LIKE p0347-scrmm.
DATA : BEGIN OF it_0000 OCCURS 100,
pernr LIKE pa0000-pernr,
stat2 LIKE pa0000-stat2,
massn LIKE pa0000-massn,
begda LIKE pa0000-begda,
endda LIKE pa0000-endda,
END OF it_0000.
DATA : g_molga LIKE t512t-molga.
DATA: BEGIN OF package,
lga LIKE p0008-lga01,
bet LIKE p0008-bet01,
END OF package.
DATA : BEGIN OF rgdir OCCURS 0.
INCLUDE STRUCTURE pc261.
DATA : END OF rgdir.
DATA : BEGIN OF rx-key OCCURS 0.
INCLUDE STRUCTURE pc200.
DATA : END OF rx-key.
DATA : BEGIN OF crt OCCURS 0. "result table
INCLUDE STRUCTURE pc208.
DATA : END OF crt.
DATA : b_date LIKE sy-datum,
e_date LIKE sy-datum.
DATA : darate LIKE t539j-gwcht.
DATA : gamt TYPE p.
DATA : BEGIN OF it_0001 OCCURS 100,
pernr LIKE pa0000-pernr,
ename LIKE pa0001-ename,
bukrs LIKE pa0001-bukrs,
persk LIKE pa0001-persk,
persg LIKE pa0001-persg,
werks LIKE pa0001-werks,
END OF it_0001.
**start of mod by tejas on 31.05.06
DATA : BEGIN OF it_final_sup OCCURS 100,
pernr LIKE pa0001-pernr, "PL No
ename LIKE pa0001-ename, "NAME
persg LIKE pa0001-persg, "EMP GROUP
persk LIKE pa0001-persk, "ESG
zzpla LIKE pa0001-zzpla, "PLANT/BUSINESS
orgeh LIKE pa0001-orgeh, "ORG UNIT
orgtx LIKE t527x-orgtx, "ORG UNIT TEXT
gbdat LIKE pa0002-gbdat, "DOB
termn LIKE pa0019-termn, "DOJ
zzrtdt LIKE pa0002-zzrtdt,"DOR
sepdt LIKE pa0000-begda,
no_years TYPE i, "SERVICE YEARS
stat2 LIKE pa0000-stat2, "STATUS
s_text(15), "STATUS TEXT
basic LIKE pa0008-bet01, "BASIC
da LIKE pa0008-bet01, "DA
total LIKE pa0008-bet01, "TOTAL
crt LIKE pc207-betrg, "GRTUITY
massn LIKE pa0000-massn,
begda LIKE pa0000-begda,
ason(6) ,
dates LIKE pa0002-zzrtdt,
END OF it_final_sup.
DATA : BEGIN OF it_final_nonsup OCCURS 100,
pernr LIKE pa0001-pernr, "PL No
ename LIKE pa0001-ename, "NAME
persg LIKE pa0001-persg, "EMP GROUP
persk LIKE pa0001-persk, "ESG
zzpla LIKE pa0001-zzpla, "PLANT/BUSINESS
orgeh LIKE pa0001-orgeh, "ORG UNIT
orgtx LIKE t527x-orgtx, "ORG UNIT TEXT
gbdat LIKE pa0002-gbdat, "DOB
termn LIKE pa0019-termn, "DOJ
zzrtdt LIKE pa0002-zzrtdt,"DOR
sepdt LIKE pa0000-begda,
no_years TYPE i, "SERVICE YEARS
stat2 LIKE pa0000-stat2, "STATUS
s_text(15), "STATUS TEXT
basic LIKE pa0008-bet01, "BASIC
da LIKE pa0008-bet01, "DA
total LIKE pa0008-bet01, "TOTAL
crt LIKE pc207-betrg, "GRTUITY
massn LIKE pa0000-massn,
begda LIKE pa0000-begda,
ason(6) ,
dates LIKE pa0002-zzrtdt,
END OF it_final_nonsup.
DATA : BEGIN OF it_final OCCURS 100,
pernr LIKE pa0001-pernr, "PL No
ename LIKE pa0001-ename, "NAME
persg LIKE pa0001-persg, "EMP GROUP
persk LIKE pa0001-persk, "ESG
zzpla LIKE pa0001-zzpla, "PLANT/BUSINESS
orgeh LIKE pa0001-orgeh, "ORG UNIT
orgtx LIKE t527x-orgtx, "ORG UNIT TEXT
gbdat LIKE pa0002-gbdat, "DOB
termn LIKE pa0019-termn, "DOJ
zzrtdt LIKE pa0002-zzrtdt,"DOR
sepdt LIKE pa0000-begda,
no_years TYPE i, "SERVICE YEARS
stat2 LIKE pa0000-stat2, "STATUS
s_text(15), "STATUS TEXT
basic LIKE pa0008-bet01, "BASIC
da LIKE pa0008-bet01, "DA
total LIKE pa0008-bet01, "TOTAL
crt LIKE pc207-betrg, "GRTUITY
massn LIKE pa0000-massn,
begda LIKE pa0000-begda,
ason(6) ,
dates LIKE pa0002-zzrtdt,
END OF it_final.
**end of mod by tejas on 31.05.06
DATA : f_pabrj LIKE t549s-pabrj,
f_pabrp LIKE t549s-pabrp.
DECLARATIONS FOR ALV DISPLAY
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv ,
gs_print TYPE slis_print_alv,
gt_filter TYPE slis_t_filter_alv,
gt_sp_group TYPE slis_t_sp_group_alv,
gt_alv_graphics TYPE dtc_t_tc,
gt_excluding TYPE slis_t_extab ,
gt_events TYPE slis_t_event,
gt_print TYPE slis_print_alv.
DATA: gt_list_top_of_page TYPE slis_t_listheader.
DATA: g_boxnam TYPE slis_fieldname VALUE 'BOX',
p_f2code LIKE sy-ucomm VALUE '&ETA',
p_lignam TYPE slis_fieldname VALUE 'LIGHTS',
g_save(1) TYPE c VALUE 'X',
g_default(1) TYPE c VALUE 'X',
g_exit(1) TYPE c,
gx_variant LIKE disvariant,
g_variant LIKE disvariant,
g_repid LIKE sy-repid.
DATA : result TYPE pay99_result.
DATA : crt_header TYPE LINE OF hrpay99_crt.
INITIALIZATION.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECT-OPTIONS : sstat2 FOR pa0000-stat2.
SELECTION-SCREEN: END OF BLOCK b2.
*SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECTION-SCREEN : SKIP.
*PARAMETERS : P_STAT2 LIKE PA0000-STAT2.
*SELECTION-SCREEN : SKIP.
*SELECTION-SCREEN : END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'PNPABKRS-LOW'.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN." on pnppabrj.
IF pnptimr9 = 'X'.
CONCATENATE pnpdispj pnpdispp INTO period.
CONCATENATE pnpdispp pnpdispj INTO pay_period.
ELSE.
CONCATENATE pnppabrj pnppabrp INTO period.
CONCATENATE pnppabrp pnppabrj INTO pay_period.
ENDIF.
IF period < '200505'.
MESSAGE e001 WITH
'Gratuity report is for period after month Auguest 2005' .
STOP.
ENDIF.
SELECT SINGLE * FROM t569v
WHERE abkrs = pnpxabkr.
CONCATENATE t569v-pabrj t569v-pabrp INTO c_period.
IF period > c_period.
MESSAGE e001 WITH 'Payroll for this period is not yet processed' .
STOP.
ENDIF.
CONCATENATE pnppabrj pnppabrp INTO period.
CONCATENATE pnppabrp pnppabrj INTO pay_period.
IF period =< '200505'.
MESSAGE e001 WITH 'Program is not valid for this period' pnppabrj
*pnppabrp.
ENDIF.
START-OF-SELECTION.
GET pernr.
PERFORM fill_data.
END-OF-SELECTION.
PERFORM final_data.
PERFORM display_data.
*& Form FILL_DATA
text
--> p1 text
<-- p2 text
FORM fill_data.
SORT p0000 BY pernr.
SORT p0001 BY pernr.
SORT p0002 BY pernr.
SORT p0008 BY pernr.
start mod made by kinjal for payroll dates
IF pnptimr9 = 'X'.
CALL FUNCTION 'HR_GB_PERIOD_DATES'
EXPORTING
abkrs = pnpxabkr
PERMO =
pabrj = pnpdispj
pabrp = pnpdispp
IMPORTING
begda = b_date
endda = e_date .
EXCEPTIONS
PERIOD_NOT_FOUND = 1
OTHERS = 2
ELSE.
CALL FUNCTION 'HR_GB_PERIOD_DATES'
EXPORTING
abkrs = pnpxabkr
PERMO =
pabrj = pnppabrj
pabrp = pnppabrp
IMPORTING
begda = b_date
endda = e_date
EXCEPTIONS
PERIOD_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.
ENDIF.
CONCATENATE pnppabrj pnppabrp '01' INTO b_date.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
EXPORTING
iv_date = b_date
IMPORTING
EV_MONTH_BEGIN_DATE =
ev_month_end_date = e_date.
end of modification
*DATA FETCHING FOR SUPERVISOR EMPLOYEES
LOOP AT p0001 WHERE begda <= e_date AND
endda >= e_date AND
persg = 'R' OR
persg = 'P'
AND
( persk >= '11' AND
persk <= '17'
OR
( persk >= 'IA' AND
persk <= 'IJ'
MOVE-CORRESPONDING p0001 TO it_final_sup.
READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
IF sy-subrc = 0.
MOVE-CORRESPONDING p0002 TO it_final_sup.
ENDIF.
LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
>= e_date AND stat2 IN sstat2.
SELECT SINGLE orgtx INTO it_final_sup-orgtx FROM t527x
WHERE sprsl = 'EN'
AND orgeh = p0001-orgeh.
SELECT SINGLE text1 INTO it_final_sup-s_text FROM t529u
WHERE sprsl = 'EN'
AND statn = '2'
AND statv = p0000-stat2.
MOVE-CORRESPONDING p0000 TO it_final_sup.
IF p0000-massn = 'A6'.
MOVE p0000-begda TO it_final_sup-zzrtdt.
ELSE.
it_final_sup-zzrtdt = ' '.
ENDIF.
ENDLOOP.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
SELECT SINGLE termn INTO it_final_sup-termn FROM pa0019
WHERE pernr = p0001-pernr
AND tmart = '06'.
IF sy-subrc = 0.
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = sy-datum
date2 = it_final_sup-termn
output_format = '05'
IMPORTING
years = ason_yr
months = ason_mon
DAYS =
EXCEPTIONS
invalid_dates_specified = 1
OTHERS = 2
IF ason_mon > 6.
ason_yr = ason_yr + 1.
ENDIF.
MOVE ason_yr TO it_final_sup-no_years.
ENDIF.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT p0008 WHERE begda <= e_date AND endda >= e_date AND pernr =
p0001-pernr.
DO 20 TIMES VARYING package-lga FROM p0008-lga01 NEXT p0008-lga02
VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
CASE package-lga.
WHEN '0010'.
it_final_sup-basic = package-bet + it_final_sup-basic.
WHEN '0I10'.
it_final_sup-da = package-bet + it_final_sup-da.
ENDCASE.
ENDDO.
it_final_sup-total = it_final_sup-basic + it_final_sup-da.
ENDLOOP.
BREAK-POINT.
start mod made by kinjal
it_final_sup-zzrtdt = it_final_sup-zzrtdt - 1.
CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
EXPORTING
get_begda = it_final_sup-zzrtdt
GET_ENDDA =
get_permo = '67'
IMPORTING
get_pabrj = f_pabrj
get_pabrp = f_pabrp
TABLES
GET_PERIODS =
EXCEPTIONS
no_period_found = 1
no_valid_permo = 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.
IF it_final_sup-stat2 <> '3'.
CONCATENATE it_final-dates+4(2) INTO period.
CONCATENATE f_pabrj f_pabrp INTO period.
it_final_sup-ason = period.
ENDIF.
end of mod
rx-key-pernr = p0001-pernr.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = p0001-pernr
IMPORTING
molga = g_molga
TABLES
in_rgdir = rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
LOOP AT rgdir WHERE fpper = period AND inper = period.
ENDLOOP.
With this Seq. number as a key for cluster Key
we can read the RT table from the cluster/..
IF 2
IF sy-subrc EQ 0.
rx-key-seqno = rgdir-seqnr.
IMPORT crt FROM DATABASE pcl2(in) ID rx-key.
IF NOT crt[] IS INITIAL.
PERFORM resultstab.
ENDIF.
APPEND it_final_sup.
CLEAR it_final_sup.
ENDIF.
LOOP AT rgdir WHERE
inper = period AND
srtza = 'A'.
rx-key-seqno = rgdir-seqnr.
number = rgdir-seqnr.
CLEAR rt.
REFRESH rt.
Importing Result table cluster
IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
IF NOT rt[] IS INITIAL.
PERFORM resultstab.
ENDIF.
ENDLOOP.
APPEND it_final.
CLEAR IT_FINAL.
ENDLOOP.
RP-PROVIDE-FROM-LAST P0008 SPACE B_DATE E_DATE.
BREAK-POINT.
DO 10 TIMES varying PACKAGE-LGA from p0008-lga01 next p0008-lga02
varying package-bet from p0008-bet01 next p0008-bet02.
compute itab-gross = itab-gross + package-bet.
IF sy-index = 10.
itab-pernr = p0008-pernr.
append itab.
endif.
enddo.
*DATA FETCHING FOR NON SUPERVISOR EMPLOYEES
LOOP AT p0001 WHERE begda <= e_date AND
endda >= e_date AND
persg = 'R' OR
persg = 'P'
AND
persk >= 'IL' AND
persk <= 'IV'
MOVE-CORRESPONDING p0001 TO it_final_nonsup.
READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
IF sy-subrc = 0.
MOVE-CORRESPONDING p0002 TO it_final_nonsup.
ENDIF.
LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
>= e_date AND stat2 IN sstat2.
SELECT SINGLE orgtx INTO it_final_nonsup-orgtx FROM t527x
WHERE sprsl = 'EN'
AND orgeh = p0001-orgeh.
SELECT SINGLE text1 INTO it_final_nonsup-s_text FROM t529u
WHERE sprsl = 'EN'
AND statn = '2'
AND statv = p0000-stat2.
MOVE-CORRESPONDING p0000 TO it_final_nonsup.
IF p0000-massn = 'A6'.
MOVE p0000-begda TO it_final_nonsup-sepdt.
MOVE p0000-begda TO refdt.
ELSE.
MOVE it_final_nonsup-zzrtdt TO refdt.
MOVE e_date TO refdt.
ENDIF.
ENDLOOP.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
SELECT SINGLE termn INTO it_final_nonsup-termn FROM pa0019
WHERE pernr = p0001-pernr
AND tmart = '06'.
IF sy-subrc = 0.
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = refdt
date2 = it_final_nonsup-termn
output_format = '05'
IMPORTING
years = ason_yr
months = ason_mon
DAYS =
EXCEPTIONS
invalid_dates_specified = 1
OTHERS = 2
IF ason_mon > 6.
ason_yr = ason_yr + 1.
ENDIF.
MOVE ason_yr TO it_final_nonsup-no_years.
ENDIF.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT p0008 WHERE begda <= refdt AND endda >= refdt AND
LOOP AT p0008 WHERE begda <= e_date AND endda >= e_date AND
pernr = p0001-pernr.
DO 20 TIMES VARYING package-lga FROM p0008-lga01 NEXT p0008-lga02
VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
CASE package-lga.
WHEN '0010'.
it_final_nonsup-basic = package-bet.
ENDCASE.
ENDDO.
ENDLOOP.
IF it_final_nonsup-massn = 'A6'.
SELECT SINGLE gwcht FROM t539j
INTO darate
WHERE molga = '40'
AND bwlga = '0I10'
AND begda <= it_final_nonsup-begda
AND endda >= it_final_nonsup-begda.
ELSE.
SELECT SINGLE gwcht FROM t539j
INTO darate
WHERE molga = '40'
AND bwlga = '0I10'
AND begda <= e_date
AND endda >= e_date.
ENDIF.
it_final_nonsup-da = ( it_final_nonsup-basic * darate ) / 100.
it_final_nonsup-total = it_final_nonsup-basic + it_final_nonsup-da.
gamt = 0.
gamt = ( it_final_nonsup-total * 15 * it_final_nonsup-no_years )
/ 26.
IF gamt >= 350000.
gamt = 350000.
ENDIF.
MOVE gamt TO it_final_nonsup-crt.
CLEAR gamt.
CLEAR refdt.
APPEND it_final_nonsup.
CLEAR it_final_nonsup.
LOOP AT rgdir WHERE
inper = period AND
srtza = 'A'.
rx-key-seqno = rgdir-seqnr.
number = rgdir-seqnr.
CLEAR rt.
REFRESH rt.
Importing Result table cluster
IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
IF NOT rt[] IS INITIAL.
PERFORM resultstab.
ENDIF.
ENDLOOP.
APPEND it_final.
CLEAR IT_FINAL.
ENDLOOP.
ENDFORM. " FILL_DATA
" GET_GRATUITY
*& Form RESULTSTAB
text
--> p1 text
<-- p2 text
FORM resultstab.
LOOP AT crt WHERE lgart = '9GRA' AND cumty = 'U'.
it_final_sup-crt = abs( crt-betrg ).
ENDLOOP.
ENDFORM. " RESULTSTAB
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data.
IF it_final[] IS INITIAL.
MESSAGE i001 WITH 'No data found'.
STOP.
ENDIF.
g_repid = sy-repid.
PERFORM e01_fieldcat_init USING gt_fieldcat[].
PERFORM eventtab_build CHANGING gt_events.
PERFORM e04_comment_build USING gt_list_top_of_page[].
PERFORM display_report.
ENDFORM. " DISPLAY_DATA
*& Form E01_FIELDCAT_INIT
text
-->P_GT_FIELDCAT[] text
FORM e01_fieldcat_init USING e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
gs_layout-group_change_edit = 'X'.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PERNR'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Pers No'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ENAME'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Name'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PERSK'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'ESG Cd'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ZZPLA'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Plant/Business'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ORGTX'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Org.Unit'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'GBDAT'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Dt.Of Birth'.
ls_fieldcat-datatype = 'DATS'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TERMN'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Dt.Of Joining'.
ls_fieldcat-datatype = 'DATS'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ZZRTDT'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Superannuation Dt'.
ls_fieldcat-datatype = 'DATS'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'SEPDT'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Dt.Of Seperation'.
ls_fieldcat-datatype = 'DATS'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'NO_YEARS'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Service Years'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'S_TEXT'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Status'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'BASIC'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Basic'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'DA'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'DA'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'TOTAL'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Total'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'CRT'.
ls_fieldcat-tabname = 'IT_FINAL'.
ls_fieldcat-seltext_l = 'Gratuity'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-no_zero = 'X'.
APPEND ls_fieldcat TO e01_lt_fieldcat.
ENDFORM. " E01_FIELDCAT_INIT
*& Form EVENTTAB_BUILD
text
<--P_GT_EVENTS text
FORM eventtab_build CHANGING lt_events TYPE slis_t_event.
CONSTANTS:
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE gc_formname_top_of_page TO ls_event-form.
APPEND ls_event TO lt_events.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form E04_COMMENT_BUILD
text
-->P_GT_LIST_TOP_OF_PAGE[] text
FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader
DATA: ls_line TYPE slis_listheader.
DATA : v_text(100) TYPE c,
v_text1(100) TYPE c,
date1(10),
date2(10).
v_pernrlines TYPE i,
v_pernrchar(5).
DESCRIBE TABLE it_pernr LINES v_pernrlines.
MOVE v_pernrlines TO v_pernrchar.
CONCATENATE b_date6(2) '.' b_date4(2) '.' b_date+0(4) INTO date1.
CONCATENATE e_date6(2) '.' e_date4(2) '.' e_date+0(4) INTO date2.
CONCATENATE 'Gratuity Information for ' date1 'to' date2
INTO v_text SEPARATED BY space.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = v_text.
APPEND ls_line TO e04_lt_top_of_page.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = v_text1.
APPEND ls_line TO e04_lt_top_of_page.
ENDFORM. " E04_COMMENT_BUILD
*& Form DISPLAY_REPORT
text
--> p1 text
<-- p2 text
FORM display_report.
gs_layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_background_id = 'ALV_BACKGROUND'
i_callback_program = g_repid
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'IT_FINAL'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
it_special_groups = gt_sp_group[]
it_sort = gt_sort[]
it_filter = gt_filter[]
i_save = g_save
is_variant = g_variant
it_events = gt_events
is_print = gs_print
it_alv_graphics = gt_alv_graphics[]
it_excluding = gt_excluding
TABLES
t_outtab = it_final.
ENDFORM. " DISPLAY_REPORT
FORM top_of_page *
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page.
ENDFORM . "TOP_OF_PAGE
FORM user_command USING g_ucomm TYPE sy-ucomm
g_field TYPE slis_selfield.
CASE g_ucomm.
WHEN '&IC1'.
ENDCASE.
ENDFORM. "USER_COMMAND
*& Form FINAL_DATA
text
--> p1 text
<-- p2 text
FORM final_data.
LOOP AT it_final_sup.
MOVE-CORRESPONDING it_final_sup TO it_final.
APPEND it_final.
CLEAR it_final.
ENDLOOP.
LOOP AT it_final_nonsup.
MOVE-CORRESPONDING it_final_nonsup TO it_final.
APPEND it_final.
CLEAR it_final.
ENDLOOP.
SORT it_final BY pernr.
ENDFORM. " FINAL_DATA
<b>Reward if useful,</b>
Regards,
Tejas -
Could not read administrative data for payroll result
Hi Experts,
I am trying to extract data from ECC6.0 for datasource 0HR_PP_REC_51 and getting error:
"Personnel No. 00100062 : Could not read administrative data for payroll result HR_BIW_PP"
Can any body tell me the relevant solution for that.
Thanks in advance!
SapnaHi Sapna,
Please can you tell me how to fix this error, I have the same problem now.
Thanks in advance. -
Reading Payroll Results using PNPCE
Hi All,
As far as reading infotypes/master data is concerned, I am comfortable using "PNPCE" instead of logical database "PNP".
Can any one tell me how can I read payroll results using "PNPCE". Since Get payroll event is not available in pnpce.Hi khalid,
1. U want the remuneration (monthly salary )
2. U won't get it DIRECTLY from any table.
(Its stored in cluster format)
3. Use this logic and FM.
DATA: myseqnr LIKE hrpy_rgdir-seqnr.
DATA : mypy TYPE payin_result.
DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.
SELECT SINGLE seqnr FROM hrpy_rgdir
INTO myseqnr
WHERE pernr = mypernr
AND fpper = '200409'
AND srtza = 'A'.
IF sy-subrc = 0.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
clusterid = 'IN'
employeenumber = mypernr
sequencenumber = myseqnr
CHANGING
payroll_result = mypy
EXCEPTIONS
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
error_reading_archive = 8
error_reading_relid = 9
OTHERS = 10.
myrt[] = mypy-inter-rt.
READ TABLE myrt WITH KEY lgart = '1899'.
4. the internal table myrt
will contain what u require.
regards,
amit m. -
Modify payroll result from ABAP
How can I modify the some fields of payroll result from a ABAP program ???
I need modify some fields from rgdir. For example "juper" field"
Thanksyou will have to include some definitions:
RPC2RDD0 (this is for Germany, find out your country definition)
RPC2CD00
RPUPC200
rp-init-buffer.
cd-key = YOUR-pernr.
*--- read directory
perform import_directory_national using errcode.
if errcode ne 0.
perform write_error using 'CD1'.
continue.
endif.
sort rgdir by fpper descending.
loop at rgdir where fpbeg >= YOUR-begda
and fpbeg <= YOUR-endda.
rx-key-pernr = YOUR-pernr.
rx-key-seqno = rgdir-seqnr.
*--- Import of the PCL2-record
perform import_cluster_national using errcode.
if errcode ne 0.
perform write_error using 'RD1'.
continue.
endif.
*--- Transformation of the data
z_rd = z_rd + 1.
loop at wpbp.
break-point.
endloop.
*--- Export of the transformed data
if p_test = no.
rd-version = ord-version.
rd-version-uname = sy-uname.
rd-version-pgmid = sy-repid.
rd-version-datum = sy-datum.
rd-version-uzeit = sy-uzeit.
perform export_cluster_national using errcode.
if errcode ne 0.
perform write_error using 'RD3'.
else.
perform prepare_update using 'V'.
if rx-key-pernr ne rxpernr_alt.
commit work and wait.
endif.
endif.
rxpernr_alt = rx-key-pernr.
endif.
endloop.
pernr_alt = keytab-pernr.
FORM IMPORT_DIRECTORY_NATIONAL *
form import_directory_national using $errcode.
rp-imp-c2-cd.
$errcode = rp-imp-cd-subrc.
endform.
FORM IMPORT_CLUSTER_NATIONAL *
form import_cluster_national using $errcode.
rp-imp-c2-rd.
if rp-imp-rd-subrc ne 0.
perform write_error using 'RD1'.
add 1 to nreject.
else.
if ord-version-number ne rd-version-number.
perform write_error using 'RD2'.
add 1 to nreject.
rp-imp-rd-subrc = 4.
endif.
endif.
$errcode = rp-imp-rd-subrc.
endform.
FORM EXPORT_CLUSTER_NATIONAL *
form export_cluster_national using $errcode.
rp-exp-c2-rd.
$errcode = rp-imp-rd-subrc.
endform. -
Function module for reading payroll results
HI,
I need a function module for reading payroll results RT table.
Import parameters are personal number, payroll area, and payroll period.
Export should be RT table.
Regards,
Wasim AhmedHai Wasim
Check the following Code
data: payroll_cluster like t500l-relid.
call function 'PYXX_READ_PAYROLL_RESULT'
exporting
clusterid = payroll_cluster
employeenumber = pernr-pernr
sequencenumber = payroll-evp-seqnr
READ_ONLY_BUFFER = ' '
READ_ONLY_INTERNATIONAL = ' '
CHECK_READ_AUTHORITY = 'X'
IMPORTING
VERSION_NUMBER_PAYVN =
VERSION_NUMBER_PCL2 =
changing
payroll_result = payroll_us
exceptions
illegal_isocode_or_clusterid = 1
error_generating_import = 2
import_mismatch_error = 3
subpool_dir_full = 4
no_read_authority = 5
no_record_found = 6
versions_do_not_match = 7
others = 8
if sy-subrc <> 0.
if sy-subrc <> 0.
write: / 'Fehler beim Laden des US Abrechnungsergebnisses'(003).
write: /'zu Personalnummer'(008), pernr-pernr,
'bei Sequence-Number'(012),
payroll-evp-seqnr.
write: / 'Fehlercode ='(004), sy-subrc.
endif.
endif.
Thanks & regards
Sreenivasulu P -
Short dump while reading Payroll results
we have a Z program to read the payroll results for a quarter(3 months)for a large number of employees.
As the internal allocated memory is 2G. This is exceeding that limit resulting in a short dump.
There are no big internal tables in the program except reading some 8 infotypes using rp-provide and get pernr one at a time.
But, in the FM CU_READ_RGDIR the pcl2 cluster records are being stored in an internal table IMPORT_DATA[] and not refreshed, which I think is the cause for the large memory usage. Any suggestions or directions are welcome.
Any suggestions
Thanks,
KumarSantosh,
Thanks for your inputs,
But my internal table type is of DEC (5,2) , I am getting that... it needs to be of type 'C'. Can you suggest.
Ex :
MOVE wa_temp-infile_string+106(8) TO wa_item-QT_PERCENT
This didnt work
so i tried moving into a seperate variable
MOVE wa_temp-infile_string+106(8) TO v_percent.
and then write to
WRITE v_percent to wa_item-QT_PERCENT. -
RFC for reading payroll results into Accounting
hi folks,
I have the HR payroll results forwarded to accounting. I need to display these results in the accounting system. Is there a RFC enabled function module to do that?
your help is really appreciated.
thanks
VinuHi
Well theres a Fm "RFC_READ_TABLE" , if you have authorization of target system you can read PCL1,2 Tables.
Here`s the FM "BAPI_GET_PAYROLL_RESULT_LIST"
Hope thisll help you
Thanks
Message was edited by: Suleman Javed -
Fast fromula related to oracle payroll are not called from Formula result window
Hi,
Few of the fast fromula related to oracle payroll are not called from Formula result window , please let me know how these fast formulas are called.
Example : PAY_GB_EDI_MOVDED6_FOOTER
Thanks,
Subbu.Hi Subbu,
Some reports are handled by the PYUGEN engine as Magnetic reports.
These are old fashion reports to generate Magnetic files, like BACS EDI files etc..
select * from ff_formulas_f
where formula_name like 'PAY_GB_EDI_MOVDED6%';
If you see the above, there are 3 formulas defined for generating this report - Header, Body & Footer.
All are called in a sequence by the PYUGEN process based on what you seed in pay_magnetic_blocks.
All the logic is within these Fast formulas.
But as they're seeded there's nothing much you can do.
Cheers,
Vignesh -
Urgent :Posting Payroll results from Legacy system to FI/co
Hi Experts,
A client requirment is such that they have to post payroll results to FI/Co
They are not using SAP HR- Payroll module . They use their own payroll
processing system .
Please tell what would be the best way of doing so
Help is urgently required
Nidhihai nidhi,
Inform ABAP team to develop the programme for payroll results,and post the entry to FI through T.code F-02.
govind. -
How to import payroll result from 3rd party system to SAP
Hi Experts,
May i know how to import payroll result from legacy system / 3rd party payroll system into SAP.
i need to import the payroll result from Jan - April (from 3rd party payroll system) and system go live on May. I using payroll malaysia.
Thanks.check this link
http://help.sap.com/saphelp_40b/helpdata/en/91/80e9087834d111a4620060b03c3b0e/content.htm -
How do I search scanned documents that Adobe Reader reads but shows 0 results from the search?
How do I search scanned documents that Adobe Reader reads but shows 0 results from the search?
If the scanned document was not processed for OCR, then it is just an image and cannot be searched for text.
-
Retrieving absence quota data from payroll
Hi,
is there a way of fetching ABWKONTI data from payroll schema without using wages in the ZL table?
I need to access infty 2006 from payroll schema.
Thanks
Tom
IHi
I am not having the SAP rite now , but u can find some FM using texts bapi
quota
Detail
List
U will fine one FM , wherein just pass the pernr
it will give u all quota records hold by him/her .
If the selection has to be made specific pass in other parameters accordingly .
Hope this helps .
regards.
Maybe you are looking for
-
Adobe Acrobat 9.0 has encountered a problem and needs to close
Hi! I'd like to start using Adobe Acrobat 9.0 with Acrobat.com, but I don't get very far before I get the error message " Adobe Acrobat 9.0 has encountered a problem and needs to close." This happens after I click "distribute form" and fill out the e
-
Brand New iMac - Had to Repair Disk, Wouldn't Startup
I'm not happy to say the least that I've had my new intel imac 20" loaded with RAM, video memory, and more, for less than 24 hours and it already terminally crashed. I'm an Interactive Designer and loaded thousands of fonts, audio and video files, an
-
Delaying the message delivery by 1 hour in XI
Hi Gurus, Is it possible to hold the message with in XI for a specified time period? As an alternate - I am developing a BPM where I am using wait step for 1 hour. I think using BPM for this purpose is not recommended as wait step consumes more resou
-
Home Button Acts up Need some help please
Hello, My iPhone 3GS keeps hitting the home button by itslef and wont let me do anything and I have tried resetting my phone and everything but doesnt work what do I do. My iPhone is currently at iOS 5.1.1.
-
Outgoing payment file XML for Germany
Hi, my customer wants to create a XML file for the outgoing payment file to the bank in Germany, when I look in the DMEE for the tree type PAYM, there is no format tree for Germany ? how can I configure this XML for Germany ? I have configured in the