SAP RP_APPLICANT_VALIDITY_INTERVAL Function Module for Determines existence of applicants in period specified









RP_APPLICANT_VALIDITY_INTERVAL is a standard rp applicant validity interval SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determines existence of applicants in period specified processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rp applicant validity interval FM, simply by entering the name RP_APPLICANT_VALIDITY_INTERVAL into the relevant SAP transaction such as SE37 or SE38.

Function Group: RPAP
Program Name: SAPLRPAP
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function RP_APPLICANT_VALIDITY_INTERVAL pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RP_APPLICANT_VALIDITY_INTERVAL'"Determines existence of applicants in period specified
EXPORTING
APLNO = "Applicant number
BEGDA = "Start date (-->input)
ENDDA = "End date (-->input)
* MASSN = "

IMPORTING
LAST_VALID_BEGDA = "Start date of applicant validity period
LAST_VALID_ENDDA = "End date of applicant validity period
PERNR_INT_APPLICANT = "Applicant's personnel number
OTYPE = "Applicant object type

TABLES
* VALID_RECORDS = "Applicant validity intervals

EXCEPTIONS
NO_VALID_RECORD_IN_INTERVAL = 1 PERNR_OF_APPLICANT_EXISTS_NOT = 2 INCONSISTENCY = 3 ERROR_IN_FEATURE_PRELI = 4
.



IMPORTING Parameters details for RP_APPLICANT_VALIDITY_INTERVAL

APLNO - Applicant number

Data type: P4000-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

BEGDA - Start date (-->input)

Data type: P4000-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

ENDDA - End date (-->input)

Data type: P4000-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

MASSN -

Data type: PSPAR-MASSN
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RP_APPLICANT_VALIDITY_INTERVAL

LAST_VALID_BEGDA - Start date of applicant validity period

Data type: P4000-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

LAST_VALID_ENDDA - End date of applicant validity period

Data type: P4000-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

PERNR_INT_APPLICANT - Applicant's personnel number

Data type: P4000-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

OTYPE - Applicant object type

Data type: PLOG-OTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RP_APPLICANT_VALIDITY_INTERVAL

VALID_RECORDS - Applicant validity intervals

Data type: PAPVA
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_VALID_RECORD_IN_INTERVAL - No valid record in validity period

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PERNR_OF_APPLICANT_EXISTS_NOT - Applicant's personnel number does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INCONSISTENCY - Inconsistency between infotypes 0001 and 4005

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_IN_FEATURE_PRELI -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RP_APPLICANT_VALIDITY_INTERVAL Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_aplno  TYPE P4000-PERNR, "   
lt_valid_records  TYPE STANDARD TABLE OF PAPVA, "   
lv_last_valid_begda  TYPE P4000-BEGDA, "   
lv_no_valid_record_in_interval  TYPE P4000, "   
lv_begda  TYPE P4000-BEGDA, "   
lv_last_valid_endda  TYPE P4000-ENDDA, "   
lv_pernr_of_applicant_exists_not  TYPE P4000, "   
lv_endda  TYPE P4000-ENDDA, "   
lv_inconsistency  TYPE P4000, "   
lv_pernr_int_applicant  TYPE P4000-PERNR, "   
lv_massn  TYPE PSPAR-MASSN, "   
lv_otype  TYPE PLOG-OTYPE, "   
lv_error_in_feature_preli  TYPE PLOG. "   

  CALL FUNCTION 'RP_APPLICANT_VALIDITY_INTERVAL'  "Determines existence of applicants in period specified
    EXPORTING
         APLNO = lv_aplno
         BEGDA = lv_begda
         ENDDA = lv_endda
         MASSN = lv_massn
    IMPORTING
         LAST_VALID_BEGDA = lv_last_valid_begda
         LAST_VALID_ENDDA = lv_last_valid_endda
         PERNR_INT_APPLICANT = lv_pernr_int_applicant
         OTYPE = lv_otype
    TABLES
         VALID_RECORDS = lt_valid_records
    EXCEPTIONS
        NO_VALID_RECORD_IN_INTERVAL = 1
        PERNR_OF_APPLICANT_EXISTS_NOT = 2
        INCONSISTENCY = 3
        ERROR_IN_FEATURE_PRELI = 4
. " RP_APPLICANT_VALIDITY_INTERVAL




ABAP code using 7.40 inline data declarations to call FM RP_APPLICANT_VALIDITY_INTERVAL

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single PERNR FROM P4000 INTO @DATA(ld_aplno).
 
 
"SELECT single BEGDA FROM P4000 INTO @DATA(ld_last_valid_begda).
 
 
"SELECT single BEGDA FROM P4000 INTO @DATA(ld_begda).
 
"SELECT single ENDDA FROM P4000 INTO @DATA(ld_last_valid_endda).
 
 
"SELECT single ENDDA FROM P4000 INTO @DATA(ld_endda).
 
 
"SELECT single PERNR FROM P4000 INTO @DATA(ld_pernr_int_applicant).
 
"SELECT single MASSN FROM PSPAR INTO @DATA(ld_massn).
 
"SELECT single OTYPE FROM PLOG INTO @DATA(ld_otype).
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!