on 11-12-2012 9:17 AM
hi all,
can any body have the code for printing the values of
wagetypes /3e1 and /3e2 of ESi, i can able to get
all the amounts of all wagetypes, want code to pick only ESI wage type
/3e2 and 3e1 for a report program.
Hi
If you are using ALV report then use REUSE_ALV_GRID_DISPLAY -FM
Best Regards
Venkata Manikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
infotypes: 0000, 0001,0588,0008.
TABLES: t554s, t500p, pernr, pcl1, pcl2.
INCLUDE rpclst00.
INCLUDE rpc2rx09. "Payroll results datadefns-Intl.
INCLUDE rpc2rxx0. "Payroll results datadefns-Intl.
INCLUDE rpc2rgg0. "Payroll results datadefns-GB
INCLUDE rpcfdcg0. "Payroll results datadefns-GB
INCLUDE rpcdatg0.
INCLUDE rpc2cd00. "Cluster Directory defns.
INCLUDE rpc2ps00. "Cluster: Generierte Schematas
INCLUDE rpc2pt00.
INCLUDE rpcfdc10.
INCLUDE rpcfdc00.
INCLUDE rpppxd00.
INCLUDE rpppxd10.
INCLUDE rpcfvp09.
INCLUDE rpcfvpg0.
INCLUDE rpppxm00.
types : begin of ty_data,
werks type t500p-name1,
sno type i,
pernr type p0000-pernr,
ename type p0001-ename,
esino type p0588-esino,
wage type p0008-bet01,
esi type p0008-bet01,
esir type p0008-bet01,
total type p0008-bet01,
end of ty_data.
data: IT_DATA type standard table of ty_data,
w_data type ty_data.
GET pernr.
include rpc2cd09. "Cluster CD data definition
include rpc2ca00. "Cluster CA Data-Definition
include rpppxd10. "Common part buffer PCL1/PCL2
include pc2rxin0. "Cluster IN data definition
include rpc2rx09.
clear rgdir.
cd-key-pernr = pernr-pernr.
rp-imp-c2-cu.
data : v_fpper(6) type c.
if rp-imp-cd-subrc is initial.
sort rgdir by fpper.
concatenate pn-pabrj
pn-pabrp
into v_fpper.
loop at rgdir where fpper = v_fpper.
* IF syst-subrc = 0.
rx-key-seqno = rgdir-seqnr.
rx-key-pernr = pernr-pernr.
rp-imp-c2-in.
* RETURN CODE FROM IMPORT.
if rp-imp-in-subrc is initial.
loop at rt.
case rt-lgart.
********* ESI Basis - Employee
when '/112'.
w_data-wage = w_data-wage + rt-betrg .
********* ESIC - Employee
when '/3E1'.
w_data-esi = w_data-esi + rt-betrg .
********* ESIC - Employer
when '/3E2'.
w_data-esir = w_data-esir + rt-betrg .
endcase. "CASE rt-lgart.
endloop. "LOOP AT rt.
endif. "IF rp-imp-in-subrc IS INITIAL.
* ENDIF. "IF syst-subrc = 0.
endloop.
endif. "IF rp-imp-cd-subrc IS INITIAL.
write:/ w_data-esi,
10 w_data-pernr,
20 w_data-ename,
30 w_data-esino,
40 w_data-wage,
50 w_data-esir,
60 w_data-total.
i am using this code only but it is coming as 0,00 output.
but values are there in RT
Hi
Check these FM- CD_RETROCALC_PERIOD & CD_EVALUATION_PERIODS
TABLES : PCL1, " HR Cluster 1 PCL2. " HR Cluster 2
.
INCLUDE : RPC2CD09, " Cluster Directory data definition
RPC2CA00, " Cluster CA Data-Definition
RPC2RX09, " Constants definition Payroll results
" country independent
RPPPXD00, " Data definition buffer PCL1/PCL2
RPPPXD10, " Common part buffer PCL1/PCL2
RPPPXM00. " Buffer handling routine
Use the above tables and FM.
Hope this will help
Best Regards
Venkata Manikanth
Try this program it will give you perfect result.
TABLES : pernr,pcl1,pcl2,t512t.
INFOTYPES : 0001,0002,0587,0008.
type-pools:slis.
types : begin of ty_data,
slno type i,
pernr type pa0001-pernr,
vorna type pa0002-vorna,
nachn type pa0002-nachn,
esi type betrg,
esir type betrg,
total type betrg,
end of ty_data.
Data: IT_DATA type standard table of ty_data,
w_data type ty_data.
DATA: w_var TYPE i.
Data: t_cat type SLIS_T_FIELDCAT_ALV,
wa_cat type SLIS_FIELDCAT_ALV.
INCLUDE rpc2cd09.
INCLUDE rpc2ca00.
INCLUDE rpppxd00.
INCLUDE rpppxd10.
INCLUDE rpppxm00.
INCLUDE pc2rxin0.
INCLUDE rpc2rx09.
DATA: wa_rt TYPE LINE OF hrpay99_rt,
t_t512t TYPE TABLE OF t512t,
wa_t512t LIKE LINE OF t_t512t,
lgart TYPE p0008-lga01.
START-OF-SELECTION.
SELECT * FROM t512t INTO TABLE t_t512t WHERE sprsl = sy-langu
AND molga = '40'.
w_var = 1.
GET pernr.
cd-key-pernr = pernr-pernr.
rp-imp-c2-cu.
IF rp-imp-cd-subrc EQ 0.
LOOP AT rgdir WHERE srtza = 'A'
AND fpbeg GE pn-begda
AND fpend LE pn-endda.
rx-key-pernr = p0001-pernr.
rx-key-seqno = rgdir-seqnr.
rp-imp-c2-in.
IF rp-imp-in-subrc EQ 0.
loop at rt.
case rt-lgart.
when '/3E2'.
w_data-esi = rt-betrg.
w_data-total = w_data-total + rt-betrg.
********* ESIC - Employer
when '/3E1'.
w_data-esir = rt-betrg .
w_data-total = w_data-total + rt-betrg.
endcase. "CASE rt-lgart.
endloop. "LOOP AT rt.
ENDIF.
ENDLOOP.
ENDIF.
rp_provide_from_last p0001 space pn-begda pn-endda.
IF pnp-sw-found = 1.
w_data-pernr = p0001-pernr.
ENDIF.
rp_provide_from_frst p0002 space pn-begda pn-endda.
IF pnp-sw-found = 1.
w_data-vorna = p0002-vorna.
w_data-nachn = p0002-nachn.
endif.
w_data-slno = w_var.
APPEND w_data TO it_data.
CLEAR w_data.
w_var = w_var + 1.
END-OF-SELECTION.
WA_CAT-col_pos = 0.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Sr.No.'.
WA_CAT-fieldname = 'SLNO'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 1.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Employee Code'.
WA_CAT-fieldname = 'PERNR'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 2.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'First Name'.
WA_CAT-fieldname = 'VORNA'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 3.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Last Name'.
WA_CAT-fieldname = 'NACHN'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 4.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Employer Contibution'.
WA_CAT-fieldname = 'ESI'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 5.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Employee Contibution'.
WA_CAT-fieldname = 'ESIR'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
WA_CAT-col_pos = 6.
WA_CAT-emphasize = 'C810'.
WA_CAT-seltext_m = 'Total'.
WA_CAT-fieldname = 'TOTAL'.
WA_CAT-tabname = 'IT_DATA'.
APPEND WA_CAT TO T_CAT.
clear wa_cat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
IT_FIELDCAT = t_cat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_data
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.