RP_GET_PSREF is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name RP_GET_PSREF into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
HRTV
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'RP_GET_PSREF' "
EXPORTING
pernr = " assob_hr-pernr Personnel no.
infty = " assob_hr-infty Infotype
subty = " assob_hr-subty Subtype
objps = " assob_hr-objps Object identification
sprps = " assob_hr-sprps Lock indicator for HR master record
endda = " assob_hr-endda Validity end date
begda = " assob_hr-begda Valid per.start date
seqnr = " assob_hr-seqnr Infotype record no.
refex = " pshd1-refex Reference fields exist (primary/secondary costs)
ordex = " pshd1-ordex Confirmation fields exist
IMPORTING
opsref = " psref Assignment Values for HR Objects
EXCEPTIONS
NOT_FOUND = 1 " No account assignment information found
NO_REF_OR_ACK = 2 " No reference or confirmation fields
REF_AND_ACK_EXIST = 3 " Reference AND confirmation fields exist
ARBID_NOT_FOUND = 4 " Work center not found (orders)
KOSTL_NOT_COMPLETE = 5 " Cost center incomplete (orders)
KOSTL_NOT_FOUND = 6 " Cost center not found (orders)
OTHERS = 7 " Other errors
. " RP_GET_PSREF
The ABAP code below is a full code listing to execute function module RP_GET_PSREF including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| ld_opsref | TYPE PSREF . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_opsref | TYPE PSREF , |
| ld_pernr | TYPE ASSOB_HR-PERNR , |
| ld_infty | TYPE ASSOB_HR-INFTY , |
| ld_subty | TYPE ASSOB_HR-SUBTY , |
| ld_objps | TYPE ASSOB_HR-OBJPS , |
| ld_sprps | TYPE ASSOB_HR-SPRPS , |
| ld_endda | TYPE ASSOB_HR-ENDDA , |
| ld_begda | TYPE ASSOB_HR-BEGDA , |
| ld_seqnr | TYPE ASSOB_HR-SEQNR , |
| ld_refex | TYPE PSHD1-REFEX , |
| ld_ordex | TYPE PSHD1-ORDEX . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RP_GET_PSREF or its description.