SAP PTRV_ACCESS_SHORT_FORM Function Module for









PTRV_ACCESS_SHORT_FORM is a standard ptrv access short form SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 ptrv access short form FM, simply by entering the name PTRV_ACCESS_SHORT_FORM into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRTRV_UTIL
Program Name: SAPLHRTRV_UTIL
Main Program: SAPLHRTRV_UTIL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function PTRV_ACCESS_SHORT_FORM 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 'PTRV_ACCESS_SHORT_FORM'"
EXPORTING
EMPLOYEENUMBER = "Personnel Number
TRIPNUMBER = "Trip Number
* PERIODNUMBER = "Number of Trip Period
* GET_TRIP_FROM_MEMORY = "Single-Character Indicator
* HTML_EXPORT = ' ' "

IMPORTING
RETURN = "Return Parameter(s)

TABLES
* TRIPFORM_HTML = "

EXCEPTIONS
TRIP_NOT_FOUND = 1
.



IMPORTING Parameters details for PTRV_ACCESS_SHORT_FORM

EMPLOYEENUMBER - Personnel Number

Data type: BAPIEMPL-PERNR
Optional: No
Call by Reference: Yes

TRIPNUMBER - Trip Number

Data type: BAPITRIP-TRIPNO
Optional: No
Call by Reference: Yes

PERIODNUMBER - Number of Trip Period

Data type: BAPITRVXXX-PERIOD
Optional: Yes
Call by Reference: Yes

GET_TRIP_FROM_MEMORY - Single-Character Indicator

Data type: BAPITRVXXX-BOOLEAN
Optional: Yes
Call by Reference: Yes

HTML_EXPORT -

Data type: BAPITRVXXX-BOOLEAN
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for PTRV_ACCESS_SHORT_FORM

RETURN - Return Parameter(s)

Data type: BAPIRETURN
Optional: No
Call by Reference: Yes

TABLES Parameters details for PTRV_ACCESS_SHORT_FORM

TRIPFORM_HTML -

Data type: W3HTML
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

TRIP_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PTRV_ACCESS_SHORT_FORM 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_return  TYPE BAPIRETURN, "   
lt_tripform_html  TYPE STANDARD TABLE OF W3HTML, "   
lv_employeenumber  TYPE BAPIEMPL-PERNR, "   
lv_trip_not_found  TYPE BAPIEMPL, "   
lv_tripnumber  TYPE BAPITRIP-TRIPNO, "   
lv_periodnumber  TYPE BAPITRVXXX-PERIOD, "   
lv_get_trip_from_memory  TYPE BAPITRVXXX-BOOLEAN, "   
lv_html_export  TYPE BAPITRVXXX-BOOLEAN. "   SPACE

  CALL FUNCTION 'PTRV_ACCESS_SHORT_FORM'  "
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         TRIPNUMBER = lv_tripnumber
         PERIODNUMBER = lv_periodnumber
         GET_TRIP_FROM_MEMORY = lv_get_trip_from_memory
         HTML_EXPORT = lv_html_export
    IMPORTING
         RETURN = lv_return
    TABLES
         TRIPFORM_HTML = lt_tripform_html
    EXCEPTIONS
        TRIP_NOT_FOUND = 1
. " PTRV_ACCESS_SHORT_FORM




ABAP code using 7.40 inline data declarations to call FM PTRV_ACCESS_SHORT_FORM

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 BAPIEMPL INTO @DATA(ld_employeenumber).
 
 
"SELECT single TRIPNO FROM BAPITRIP INTO @DATA(ld_tripnumber).
 
"SELECT single PERIOD FROM BAPITRVXXX INTO @DATA(ld_periodnumber).
 
"SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_get_trip_from_memory).
 
"SELECT single BOOLEAN FROM BAPITRVXXX INTO @DATA(ld_html_export).
DATA(ld_html_export) = ' '.
 


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!