SAP TP_START_STOP_CONNECTION Function Module for
TP_START_STOP_CONNECTION is a standard tp start stop connection 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 tp start stop connection FM, simply by entering the name TP_START_STOP_CONNECTION into the relevant SAP transaction such as SE37 or SE38.
Function Group: FITP_GEN
Program Name: SAPLFITP_GEN
Main Program: SAPLFITP_GEN
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TP_START_STOP_CONNECTION 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 'TP_START_STOP_CONNECTION'".
EXPORTING
* PROVIDER = "
VARIANT = "Context
* START_CONNECTION = 'X' "
IMPORTING
DESTINATION = "RFC Destination
CONTEXTHANDLER = "
CHANGED = "
CONVERSATION_ID = "
LP = "Logical Port Name
WSSE_SECURITY = "
EXCEPTIONS
NO_DESTINATION_FOUND = 1 NO_VALID_VARIANT = 2 NO_VALID_RES_SYSTEM = 3 CONNECTION_ERROR = 4 DISCONNECTION_ERROR = 5 RFC_ERROR = 6
IMPORTING Parameters details for TP_START_STOP_CONNECTION
PROVIDER -
Data type: TA21P-PROVIDEROptional: Yes
Call by Reference: No ( called with pass by value option)
VARIANT - Context
Data type: FTPT_VARIANT-VARIANTOptional: No
Call by Reference: No ( called with pass by value option)
START_CONNECTION -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TP_START_STOP_CONNECTION
DESTINATION - RFC Destination
Data type: RFCDES-RFCDESTOptional: No
Call by Reference: Yes
CONTEXTHANDLER -
Data type: FTPS_API-CTXTIDOptional: No
Call by Reference: Yes
CHANGED -
Data type: CHAR1Optional: No
Call by Reference: Yes
CONVERSATION_ID -
Data type: CHAR128Optional: No
Call by Reference: Yes
LP - Logical Port Name
Data type: SRT_LP_NAMEOptional: No
Call by Reference: Yes
WSSE_SECURITY -
Data type: CHAR128Optional: No
Call by Reference: Yes
EXCEPTIONS details
NO_DESTINATION_FOUND - No RFC destination found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_VARIANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALID_RES_SYSTEM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONNECTION_ERROR - Error when setting up connection
Data type:Optional: No
Call by Reference: Yes
DISCONNECTION_ERROR -
Data type:Optional: No
Call by Reference: Yes
RFC_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TP_START_STOP_CONNECTION 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_provider | TYPE TA21P-PROVIDER, " | |||
| lv_destination | TYPE RFCDES-RFCDEST, " | |||
| lv_no_destination_found | TYPE RFCDES, " | |||
| lv_variant | TYPE FTPT_VARIANT-VARIANT, " | |||
| lv_contexthandler | TYPE FTPS_API-CTXTID, " | |||
| lv_no_valid_variant | TYPE FTPS_API, " | |||
| lv_changed | TYPE CHAR1, " | |||
| lv_start_connection | TYPE CHAR1, " 'X' | |||
| lv_no_valid_res_system | TYPE CHAR1, " | |||
| lv_conversation_id | TYPE CHAR128, " | |||
| lv_connection_error | TYPE CHAR128, " | |||
| lv_lp | TYPE SRT_LP_NAME, " | |||
| lv_disconnection_error | TYPE SRT_LP_NAME, " | |||
| lv_rfc_error | TYPE SRT_LP_NAME, " | |||
| lv_wsse_security | TYPE CHAR128. " |
|   CALL FUNCTION 'TP_START_STOP_CONNECTION' " |
| EXPORTING | ||
| PROVIDER | = lv_provider | |
| VARIANT | = lv_variant | |
| START_CONNECTION | = lv_start_connection | |
| IMPORTING | ||
| DESTINATION | = lv_destination | |
| CONTEXTHANDLER | = lv_contexthandler | |
| CHANGED | = lv_changed | |
| CONVERSATION_ID | = lv_conversation_id | |
| LP | = lv_lp | |
| WSSE_SECURITY | = lv_wsse_security | |
| EXCEPTIONS | ||
| NO_DESTINATION_FOUND = 1 | ||
| NO_VALID_VARIANT = 2 | ||
| NO_VALID_RES_SYSTEM = 3 | ||
| CONNECTION_ERROR = 4 | ||
| DISCONNECTION_ERROR = 5 | ||
| RFC_ERROR = 6 | ||
| . " TP_START_STOP_CONNECTION | ||
ABAP code using 7.40 inline data declarations to call FM TP_START_STOP_CONNECTION
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 PROVIDER FROM TA21P INTO @DATA(ld_provider). | ||||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_destination). | ||||
| "SELECT single VARIANT FROM FTPT_VARIANT INTO @DATA(ld_variant). | ||||
| "SELECT single CTXTID FROM FTPS_API INTO @DATA(ld_contexthandler). | ||||
| DATA(ld_start_connection) | = 'X'. | |||
Search for further information about these or an SAP related objects