SAP PTRV_REC_WIZ Function Module for









PTRV_REC_WIZ is a standard ptrv rec wiz 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 rec wiz FM, simply by entering the name PTRV_REC_WIZ into the relevant SAP transaction such as SE37 or SE38.

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



Function PTRV_REC_WIZ 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_REC_WIZ'"
EXPORTING
HEAD = "General Trip Data
* PERIO = "Period Data of a Trip
RECEIPT = "Travel Expense Specifications According to Individual Receipt
* ADDINFO = "Supplemented Individual Receipt
* VAT_DETAIL = "Supplier Data for VAT Refund
* SCREEN_SET = '2' "
* CHECK_AUTHORITY = "

TABLES
RECEIPTS = "Table with Additional Trip Information
* ADDINFOS = "Table with Travel Receipt Information
* DESTINATIONS = "Stopover
* VAT_DETAILS = "Table with VAT Details Including Receipt Number

EXCEPTIONS
RECEIPT_ALREADY_DETACHED = 1 RECEIPT_NOT_ALLOWED = 2 RECEIPT_NOT_FOUND = 3 RECEIPT_WRONG_INPUT = 4 ERROR_READING_CUSTOMIZING = 5 ERROR_READING_INFOTYPE = 6 MISSING_AUTHORIZATION = 7 EXIT_COMMAND = 8
.



IMPORTING Parameters details for PTRV_REC_WIZ

HEAD - General Trip Data

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

PERIO - Period Data of a Trip

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

RECEIPT - Travel Expense Specifications According to Individual Receipt

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

ADDINFO - Supplemented Individual Receipt

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

VAT_DETAIL - Supplier Data for VAT Refund

Data type: CL_FITV_VAT_DETAILS=>TY_S_DATA
Optional: Yes
Call by Reference: No ( called with pass by value option)

SCREEN_SET -

Data type: CHAR1
Default: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_AUTHORITY -

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

TABLES Parameters details for PTRV_REC_WIZ

RECEIPTS - Table with Additional Trip Information

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

ADDINFOS - Table with Travel Receipt Information

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

DESTINATIONS - Stopover

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

VAT_DETAILS - Table with VAT Details Including Receipt Number

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

EXCEPTIONS details

RECEIPT_ALREADY_DETACHED -

Data type:
Optional: No
Call by Reference: Yes

RECEIPT_NOT_ALLOWED -

Data type:
Optional: No
Call by Reference: Yes

RECEIPT_NOT_FOUND - Document not found

Data type:
Optional: No
Call by Reference: Yes

RECEIPT_WRONG_INPUT -

Data type:
Optional: No
Call by Reference: Yes

ERROR_READING_CUSTOMIZING - Error while reading Customizing

Data type:
Optional: No
Call by Reference: Yes

ERROR_READING_INFOTYPE - Error Reading Infotypes

Data type:
Optional: No
Call by Reference: Yes

MISSING_AUTHORIZATION - Authorization missing

Data type:
Optional: No
Call by Reference: Yes

EXIT_COMMAND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PTRV_REC_WIZ 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_head  TYPE PTRV_HEAD, "   
lt_receipts  TYPE STANDARD TABLE OF TAB_PTK03, "   
lv_receipt_already_detached  TYPE TAB_PTK03, "   
lv_perio  TYPE PTRV_PERIO, "   
lt_addinfos  TYPE STANDARD TABLE OF TAB_PTK33, "   
lv_receipt_not_allowed  TYPE TAB_PTK33, "   
lv_receipt  TYPE PTK03, "   
lt_destinations  TYPE STANDARD TABLE OF PTK05_ITAB, "   
lv_receipt_not_found  TYPE PTK05_ITAB, "   
lv_addinfo  TYPE PTK33, "   
lt_vat_details  TYPE STANDARD TABLE OF TAB_PTP_BELNR_VAT_DETAILS, "   
lv_receipt_wrong_input  TYPE TAB_PTP_BELNR_VAT_DETAILS, "   
lv_vat_detail  TYPE CL_FITV_VAT_DETAILS=>TY_S_DATA, "   
lv_error_reading_customizing  TYPE CL_FITV_VAT_DETAILS=>TY_S_DATA, "   
lv_screen_set  TYPE CHAR1, "   '2'
lv_error_reading_infotype  TYPE CHAR1, "   
lv_check_authority  TYPE CHAR1, "   
lv_missing_authorization  TYPE CHAR1, "   
lv_exit_command  TYPE CHAR1. "   

  CALL FUNCTION 'PTRV_REC_WIZ'  "
    EXPORTING
         HEAD = lv_head
         PERIO = lv_perio
         RECEIPT = lv_receipt
         ADDINFO = lv_addinfo
         VAT_DETAIL = lv_vat_detail
         SCREEN_SET = lv_screen_set
         CHECK_AUTHORITY = lv_check_authority
    TABLES
         RECEIPTS = lt_receipts
         ADDINFOS = lt_addinfos
         DESTINATIONS = lt_destinations
         VAT_DETAILS = lt_vat_details
    EXCEPTIONS
        RECEIPT_ALREADY_DETACHED = 1
        RECEIPT_NOT_ALLOWED = 2
        RECEIPT_NOT_FOUND = 3
        RECEIPT_WRONG_INPUT = 4
        ERROR_READING_CUSTOMIZING = 5
        ERROR_READING_INFOTYPE = 6
        MISSING_AUTHORIZATION = 7
        EXIT_COMMAND = 8
. " PTRV_REC_WIZ




ABAP code using 7.40 inline data declarations to call FM PTRV_REC_WIZ

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_screen_set) = '2'.
 
 
 
 
 


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!