Ansicht
Dokumentation

EXIT_RPUUSSG1_DAT - Customer Exit For USS Salary Changes Interface DATA

EXIT_RPUUSSG1_DAT - Customer Exit For USS Salary Changes Interface DATA

Vendor Master (General Section)   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This Customer Exit allows customer specific amendments to be made to the Salary Change records that will be extracted for each Personnel Number that HAS ALREADY been selected using the standard processing;

Example

Perhaps certain employees MUST have a NIL PAY Salary Change record added because they were absent with NIL PAY and were NOT contributing as normal to their pension. Then this could be coded here as a "override" even though the standard processing would NOT have created the record.

Notes

This routine is called after all Salary Changes have been derived for ALL related PERNRs. Any amendments here will be directly reflected in the interface file.

If any Salary Changes are changed/added/deleted in this Customer Exit then they will be formatted and created correctly including the line sequence number.

To provide as much information as possible;

IF an ERROR or WARNING is raised and the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, SY-MSGV2, SY-MSGV3 & SY-MSGV4 have been filled, then these will be reported.

In both these cases, if the system fields have NOT been filled then following standard messages will be used; E057(HRPSGB_HER) & W058(HRPSGB_HER) respectively.

Further information

The following code expects that any changes would be "ACTIONED" on the PERNR of the Personnel Number being processed through PNP Selection at this point in the report and not the related PERNRs in the P0121 part of PERNR_SAL_TAB.

The coding in the customer exit could look like this;
*
DATA: INPUT_CURRENCY TYPE WAERS VALUE 'GBP'.
*
DATA: L_BEGDA TYPE begda,
L_BEGDA_C TYPE msgv,
L_PERNR_C TYPE msgv.
*
CASE P_ENDDA(4). "Return Year
*
WHEN '2000'.
*
CASE P_PERNR "Personnel Number in PNP Selection
*
WHEN '00000001'.
*
* Delete a record on 01.04.1999
*
LOOP AT PERNR_SAL_TAB WHERE BEGDA = '19990401' .
DELETE PERNR_SAL_TAB.
ENDLOOP.
IF SY-SUBRC ne 0. "NONE existed so issue ERROR!

*
* The Customer Message Class Z1 has Message 004 with the
* following text. "Employee &1, does NOT have a Salary Change
* on &2, DELETION NOT POSSIBLE."
*
MOVE '19990401' TO L_BEGDA.
WRITE L_BEGDA TO L_BEGDA_C.
MOVE P_PERNR TO L_PERNR_C.
MESSAGE E004(Z1) WITH L_PERNR_C L_BEGDA_C RAISING WARNING.
* ENDIF.
*
* Change the record on 01.04.1999 to a salary of '123456.78'
*
LOOP AT PERNR_SAL_TAB WHERE BEGDA = '19990401' .
MOVE '123456.78' TO PERNR_SAL_TAB-MAXBT.
MOVE P_CURRENCY TO PERNR_SAL_TAB-WAERS.
*
* The following currency conversion is ONLY necessary if you
* are entering HARD-CODED values in one currency (GBP) the
* interface amounts are being returned in a different
* currency (EURO). This may never be an issue but you should
* be aware of the currency issues involved!
*
IF P_CURRENCY NE INPUT_CURRENCY.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
DATE = PERNR_SAL_TAB-BEGDA
FOREIGN_AMOUNT = PERNR_SAL_TAB-MAXBT
FOREIGN_CURENCY = INPUT_CURRENCY
LOCAL_CURRENCY = P_CURRENCY
IMPORTING
LOCAL_AMOUNT = PERNR_SAL_TAB-MAXBT
ENDIF.
MODIFY PERNR_SAL_TAB.
ENDLOOP.
*
IF SY-SUBRC ne 0. "NONE existed so issue ERROR!
*
* The Customer Message Class Z1 has Message 005 with the
* following text. "Employee &1, does NOT have a Salary Change
* on &2, AMENDMENT NOT POSSIBLE"
*
MOVE '19990401' TO L_BEGDA.
WRITE L_BEGDA TO L_BEGDA_C.
MOVE P_PERNR TO L_PERNR_C.
MESSAGE E005(Z1) WITH L_PERNR_C L_BEGDA_C RAISING ERROR.
*
ENDIF.
*
* Add a record on 01.04.1999 to a salary of '123456.78'
*
LOOP AT PERNR_SAL_TAB WHERE BEGDA = '19990401' .
EXIT.
ENDLOOP.
IF SY-SUBRC = 0. "Already EXISTED so issue ERROR!
*
* The Customer Message Class Z1 has Message 006 with the
* following text. "Employee &1, ALREADY has a Salary Change
* on &2, ADDITION NOT POSSIBLE"
*
MOVE '19990401' TO L_BEGDA.
WRITE L_BEGDA TO L_BEGDA_C.
MOVE P_PERNR TO L_PERNR_C.
MESSAGE E006(Z1) WITH L_PERNR_C L_BEGDA_C RAISING ERROR.
*
ELSE.
MOVE '19990401' TO PERNR_SAL_TAB-BEGDA.
MOVE '123456.78' TO PERNR_SAL_TAB-MAXBT.
MOVE P_CURRENCY TO PERNR_SAL_TAB-WAERS.
*
* The following currency conversion is ONLY necessary if you
* are entering HARD-CODED values in one currency (GBP) the
* interface amounts are being returned in a different
* currency (EURO). This may never be an issue but you should
* be aware of the currency issues involved!
*
IF P_CURRENCY NE INPUT_CURRENCY.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
DATE = PERNR_SAL_TAB-BEGDA
FOREIGN_AMOUNT = PERNR_SAL_TAB-MAXBT
FOREIGN_CURENCY = INPUT_CURRENCY
LOCAL_CURRENCY = P_CURRENCY
IMPORTING
LOCAL_AMOUNT = PERNR_SAL_TAB-MAXBT
ENDIF.
* APPEND PERNR_SAL_TAB
ENDIF.
*
ENDCASE. "Personnel Number in PNP Selection
*
ENDCASE. "Return Year
*





Parameters

P_BEGDA
P_CURRENCY
P_ENDDA
P_OLD_SALARY
P_PERNR
P_SALARY_CHANGES

Exceptions

ERROR
WARNING

Function Group

XP08P1USS

PERFORM Short Reference   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 6641 Date: 20240523 Time: 062435     sap01-206 ( 56 ms )