SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Get month wise basic salary for particlular employee



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> HR
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Thu Oct 11, 2007 11:24 pm    Post subject: Get month wise basic salary for particlular employee Reply with quote

See the BAPI
BAPI_BASICPAY_GETDETAIL
or
check the fun module
'RP_FILL_WAGE_TYPE_TABLE_EXT' which gives wage types wise monthly salary details from infotype 0008.
and sample code is

Code:

constants :
c_lga01 like pa0008-lga01 value '0101', " Wage Type
c_lga02 like pa0008-lga01 value '0102', " Wage Type
c_lga03 like pa0008-lga01 value '0103', " Wage Type
c_lga04 like pa0008-lga01 value '0105', " Wage Type
c_lga05 like pa0008-lga01 value '0109', " Wage Type
c_lga06 like pa0008-lga01 value '0110', " Wage Type
c_lga07 like pa0008-lga01 value '0114', " Wage Type
c_lga08 like pa0008-lga01 value '0116', " Wage Type
c_lga09 like pa0008-lga01 value '0267'. " Wage Type
*&--------------------------------------------------------------------*
*& Form get_pay_data
*&--------------------------------------------------------------------*
* Get the Payroll Data from Infotype 0008
*---------------------------------------------------------------------*
form get_pay_data.

* Get the Payroll data from Respective Infotypes
rp_provide_from_last p0008 space pnpbegda pnpendda.
pay_tab-pernr = pernr-pernr.

call function 'RP_FILL_WAGE_TYPE_TABLE_EXT'
exporting
appli = 'E'
begda = p0008-begda
endda = p0008-endda
infty = '0008'
objps = ' '
tclas = 'A'
pernr = pernr-pernr
seqnr = ' '
subty = '0 '
dlspl = 'X'
msgflg = ''
nordct = ''
tables
pp0001 = p0001
pp0007 = p0007
pp0008 = p0008
ppbwla = wage_tab
* PP0230 =
* PP0014 =
* PP0015 =
* PP0052 =
* EXCEPTIONS
* ERROR_AT_INDIRECT_EVALUATION = 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.
loop at wage_tab.
pay_tab-waers = wage_tab-waers.
case wage_tab-lgart.
when c_lga01.
pay_tab-basic = wage_tab-betrg.
when c_lga02.
pay_tab-sup_allow = wage_tab-betrg.
when c_lga03.
pay_tab-hra_allow = wage_tab-betrg.
when c_lga04.
pay_tab-chl_allow = wage_tab-betrg.
when c_lga05.
pay_tab-soc_allow = wage_tab-betrg.
when c_lga06.
pay_tab-fix_allow = wage_tab-betrg.
when c_lga07.
pay_tab-ra_allow = wage_tab-betrg.
when c_lga08.
pay_tab-per_allow = wage_tab-betrg.
when c_lga09.
pay_tab-pen_allow = wage_tab-betrg.
when others.
pay_tab-oth_allow = pay_tab-oth_allow + wage_tab-betrg.
endcase.
pay_tab-tot_allow = pay_tab-basic + pay_tab-sup_allow +
pay_tab-hra_allow + pay_tab-chl_allow +
pay_tab-soc_allow + pay_tab-fix_allow +
pay_tab-ra_allow + pay_tab-per_allow +
pay_tab-oth_allow - pay_tab-pen_allow.
endloop.
append pay_tab.
clear pay_tab.

endform. "get_pay_data
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> HR All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.