Hi,
Refer
https://forums.sdn.sap.com/click.jspa?searchID=11250919&messageID=2014832
Regards
Kiran Sure
Hi,
From result table u can get thru get pernr.
where
LGART EQ '9101' OR
LGART EQ '9102' OR
LGART EQ '9103' OR
LGART EQ '9104' OR
LGART EQ '9105' OR
LGART EQ '9106' OR
LGART EQ '9519' OR
LGART EQ '9520' OR
LGART EQ '9521' OR
LGART EQ '9522' OR
LGART EQ '9523' OR
LGART EQ '9524' OR
LGART EQ '/LLB'.
If it is usefull pls reward pts.
Regards
Srimanta
Hi rishav singh ,
Loan balance is stored in cluster table PCL2. To get the loan balance and repayment amount use the following code.
Here /LLB gives the loan balance and /LRP gives you the loan repyment amount.
Have look on below code...
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT' EXPORTING CLUSTERID = IV_RELID EMPLOYEENUMBER = IV_PERNR SEQUENCENUMBER = LS_EVP-SEQNR READ_ONLY_INTERNATIONAL = 'X' CHANGING PAYROLL_RESULT = LS_RESULT 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. LOOP AT LS_RESULT-INTER-RT INTO LSX_RT WHERE V0TYP = 'L' AND V0ZNR = LSX_V0-V0ZNR AND LGART = '/LLB'. SELECT SINGLE STEXT FROM T591S INTO V_STEXT WHERE SPRSL = 'EN' AND INFTY = '0045' AND SUBTY = V_FLAG. IT_LOAN-LGTXT = V_STEXT+0(25). IT_LOAN-BETRG = LSX_RT-BETRG. IT_LOAN-LGART = V_FLAG. APPEND IT_LOAN. CLEAR IT_LOAN. ENDLOOP. LOOP AT LS_RESULT-INTER-RT INTO LSX_RT WHERE V0TYP = 'L' AND V0ZNR = LSX_V0-V0ZNR AND LGART = '/LRP'. SELECT SINGLE STEXT FROM T591S INTO V_STEXT WHERE SPRSL = 'EN' AND INFTY = '0045' AND SUBTY = V_FLAG. IT_LOAN_DEDU-LGTXT = V_STEXT+0(25). IT_LOAN_DEDU-BETRG = LSX_RT-BETRG * -1. IT_LOAN_DEDU-LGART = V_FLAG. APPEND IT_LOAN_DEDU. CLEAR IT_LOAN_DEDU. ENDLOOP.
Other data you can get using LDB's or form PA0001 and PA0045.
also hv a look on below thread...
hr-loan--how-to-get-loan-balance-
Hope it will solve your problem..
Reward points if useful..
Thanks & Regards
ilesh 24x7
Add a comment