SAP PTRV_AC_DOCUMENT_REMOTE Function Module for
PTRV_AC_DOCUMENT_REMOTE is a standard ptrv ac document remote 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 ac document remote FM, simply by entering the name PTRV_AC_DOCUMENT_REMOTE into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRTS
Program Name: SAPLHRTS
Main Program: SAPLHRTS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PTRV_AC_DOCUMENT_REMOTE 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_AC_DOCUMENT_REMOTE'".
EXPORTING
IV_AWREF = "
IV_COMPCODE = "
IV_GLVOR = "
IMPORTING
ES_RETURN = "
TABLES
T_DOCUMENTS = "
EXCEPTIONS
ERROR_IN_FILTEROBJECTS = 1 ERROR_IN_ALE_CUSTOMIZING = 2 NOT_UNIQUE_RECEIVER = 3 NO_RFC_DESTINATION_MAINTAINED = 4 NO_OWN_LOGICAL_SYSTEM = 5 COMMUNICATION_FAILURE = 6 SYSTEM_FAILURE = 7 UNDEFINED_ERROR = 8
IMPORTING Parameters details for PTRV_AC_DOCUMENT_REMOTE
IV_AWREF -
Data type: HRAADOCHDRP-REFDOCNOOptional: No
Call by Reference: No ( called with pass by value option)
IV_COMPCODE -
Data type: PTRV_DOC_HD-BUKRSOptional: No
Call by Reference: Yes
IV_GLVOR -
Data type: PTRV_DOC_HD-INT_GLVOROptional: No
Call by Reference: Yes
EXPORTING Parameters details for PTRV_AC_DOCUMENT_REMOTE
ES_RETURN -
Data type: BAPIRET2Optional: No
Call by Reference: Yes
TABLES Parameters details for PTRV_AC_DOCUMENT_REMOTE
T_DOCUMENTS -
Data type: BAPIACDONROptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR_IN_FILTEROBJECTS -
Data type:Optional: No
Call by Reference: Yes
ERROR_IN_ALE_CUSTOMIZING -
Data type:Optional: No
Call by Reference: Yes
NOT_UNIQUE_RECEIVER -
Data type:Optional: No
Call by Reference: Yes
NO_RFC_DESTINATION_MAINTAINED -
Data type:Optional: No
Call by Reference: Yes
NO_OWN_LOGICAL_SYSTEM -
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_FAILURE -
Data type:Optional: No
Call by Reference: Yes
SYSTEM_FAILURE -
Data type:Optional: No
Call by Reference: Yes
UNDEFINED_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for PTRV_AC_DOCUMENT_REMOTE 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_iv_awref | TYPE HRAADOCHDRP-REFDOCNO, " | |||
| lv_es_return | TYPE BAPIRET2, " | |||
| lt_t_documents | TYPE STANDARD TABLE OF BAPIACDONR, " | |||
| lv_error_in_filterobjects | TYPE BAPIACDONR, " | |||
| lv_iv_compcode | TYPE PTRV_DOC_HD-BUKRS, " | |||
| lv_error_in_ale_customizing | TYPE PTRV_DOC_HD, " | |||
| lv_iv_glvor | TYPE PTRV_DOC_HD-INT_GLVOR, " | |||
| lv_not_unique_receiver | TYPE PTRV_DOC_HD, " | |||
| lv_no_rfc_destination_maintained | TYPE PTRV_DOC_HD, " | |||
| lv_no_own_logical_system | TYPE PTRV_DOC_HD, " | |||
| lv_communication_failure | TYPE PTRV_DOC_HD, " | |||
| lv_system_failure | TYPE PTRV_DOC_HD, " | |||
| lv_undefined_error | TYPE PTRV_DOC_HD. " |
|   CALL FUNCTION 'PTRV_AC_DOCUMENT_REMOTE' " |
| EXPORTING | ||
| IV_AWREF | = lv_iv_awref | |
| IV_COMPCODE | = lv_iv_compcode | |
| IV_GLVOR | = lv_iv_glvor | |
| IMPORTING | ||
| ES_RETURN | = lv_es_return | |
| TABLES | ||
| T_DOCUMENTS | = lt_t_documents | |
| EXCEPTIONS | ||
| ERROR_IN_FILTEROBJECTS = 1 | ||
| ERROR_IN_ALE_CUSTOMIZING = 2 | ||
| NOT_UNIQUE_RECEIVER = 3 | ||
| NO_RFC_DESTINATION_MAINTAINED = 4 | ||
| NO_OWN_LOGICAL_SYSTEM = 5 | ||
| COMMUNICATION_FAILURE = 6 | ||
| SYSTEM_FAILURE = 7 | ||
| UNDEFINED_ERROR = 8 | ||
| . " PTRV_AC_DOCUMENT_REMOTE | ||
ABAP code using 7.40 inline data declarations to call FM PTRV_AC_DOCUMENT_REMOTE
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 REFDOCNO FROM HRAADOCHDRP INTO @DATA(ld_iv_awref). | ||||
| "SELECT single BUKRS FROM PTRV_DOC_HD INTO @DATA(ld_iv_compcode). | ||||
| "SELECT single INT_GLVOR FROM PTRV_DOC_HD INTO @DATA(ld_iv_glvor). | ||||
Search for further information about these or an SAP related objects