SAP OCS_TP_INTERFACE Function Module for









OCS_TP_INTERFACE is a standard ocs tp interface 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 ocs tp interface FM, simply by entering the name OCS_TP_INTERFACE into the relevant SAP transaction such as SE37 or SE38.

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



Function OCS_TP_INTERFACE 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 'OCS_TP_INTERFACE'"
EXPORTING
IV_TP_COMMAND = "
* IV_PRID_TEXT = "
* IV_PRID_MIN = 0 "
* IV_PRID_MAX = 100 "
* IV_SYSTEM_NAME = "System name
* IV_TRANSPORT_REQUEST = "Transport Request
* IV_CLIENT = "Client
* IV_UMODES = "
* IV_TP_OPTIONS = "
* IV_OFFLINE = ' ' "
* IV_TP_TPPARAM = "
* IV_TP_DESTINATION = "

IMPORTING
EV_INTERFACE_VERSION = "
EV_TP_SLOG = "
EV_TP_PID = "
EV_BUFFER_COUNT = "
EV_TPPARAM_PATH = "
EV_TP_PATH = "
EV_RFC_MESSAGE = "
EV_TP_CMD_STRING = "
EV_TP_RETURN_CODE = "
EV_TP_MESSAGE = "
EV_TP_VERSION = "tp version
EV_TP_ALOG = "

TABLES
* TT_OPTIONS = "
* TT_ARGV = "
* TT_STDOUT = "
* TT_BUFFER = "
* TT_PARAMS = "
* TT_LOGPTR = "
* TT_OBJLST = "

EXCEPTIONS
UNSUPPORTED_TP_COMMAND = 1 INSERT_TPSTAT_FAILED = 10 INSERT_TPLOG_FAILED = 11 UNKNOWN_ERROR = 12 INVALID_TP_COMMAND = 2 MISSING_PARAMETER = 3 INVALID_PARAMETER = 4 GET_TPPARAM_FAILED = 5 UPDATE_TP_DESTINATION_FAILED = 6 GET_TMS_INFO_FAILED = 7 PERMISSION_DENIED = 8 TP_CALL_FAILED = 9
.



IMPORTING Parameters details for OCS_TP_INTERFACE

IV_TP_COMMAND -

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

IV_PRID_TEXT -

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

IV_PRID_MIN -

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

IV_PRID_MAX -

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

IV_SYSTEM_NAME - System name

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

IV_TRANSPORT_REQUEST - Transport Request

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

IV_CLIENT - Client

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

IV_UMODES -

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

IV_TP_OPTIONS -

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

IV_OFFLINE -

Data type: STPA-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_TP_TPPARAM -

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

IV_TP_DESTINATION -

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

EXPORTING Parameters details for OCS_TP_INTERFACE

EV_INTERFACE_VERSION -

Data type: STPA-VERSION
Optional: No
Call by Reference: Yes

EV_TP_SLOG -

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

EV_TP_PID -

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

EV_BUFFER_COUNT -

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

EV_TPPARAM_PATH -

Data type: STPA-FILE
Optional: No
Call by Reference: Yes

EV_TP_PATH -

Data type: STPA-FILE
Optional: No
Call by Reference: Yes

EV_RFC_MESSAGE -

Data type: STPA-MESSAGE
Optional: No
Call by Reference: Yes

EV_TP_CMD_STRING -

Data type: STPA-CMDSTRING
Optional: No
Call by Reference: Yes

EV_TP_RETURN_CODE -

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

EV_TP_MESSAGE -

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

EV_TP_VERSION - tp version

Data type: STPA-VERSION
Optional: No
Call by Reference: Yes

EV_TP_ALOG -

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

TABLES Parameters details for OCS_TP_INTERFACE

TT_OPTIONS -

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

TT_ARGV -

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

TT_STDOUT -

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

TT_BUFFER -

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

TT_PARAMS -

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

TT_LOGPTR -

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

TT_OBJLST -

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

EXCEPTIONS details

UNSUPPORTED_TP_COMMAND -

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

INSERT_TPSTAT_FAILED -

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

INSERT_TPLOG_FAILED -

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

UNKNOWN_ERROR -

Data type:
Optional: No
Call by Reference: Yes

INVALID_TP_COMMAND -

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

MISSING_PARAMETER -

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

INVALID_PARAMETER -

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

GET_TPPARAM_FAILED -

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

UPDATE_TP_DESTINATION_FAILED -

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

GET_TMS_INFO_FAILED -

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

PERMISSION_DENIED -

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

TP_CALL_FAILED -

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

Copy and paste ABAP code example for OCS_TP_INTERFACE 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:
lt_tt_options  TYPE STANDARD TABLE OF TPSTDOUT, "   
lv_iv_tp_command  TYPE STPA-COMMAND, "   
lv_ev_interface_version  TYPE STPA-VERSION, "   
lv_unsupported_tp_command  TYPE STPA, "   
lv_ev_tp_slog  TYPE STPA-FILE, "   
lv_iv_prid_text  TYPE STPA-MESSAGE, "   
lv_insert_tpstat_failed  TYPE STPA, "   
lv_ev_tp_pid  TYPE STPA-PID, "   
lv_iv_prid_min  TYPE I, "   0
lv_insert_tplog_failed  TYPE I, "   
lv_iv_prid_max  TYPE I, "   100
lv_unknown_error  TYPE I, "   
lv_ev_buffer_count  TYPE STPA-COUNTER, "   
lt_tt_argv  TYPE STANDARD TABLE OF TPSTDOUT, "   
lv_iv_system_name  TYPE STPA-SYSNAME, "   
lv_ev_tpparam_path  TYPE STPA-FILE, "   
lv_invalid_tp_command  TYPE STPA, "   
lt_tt_stdout  TYPE STANDARD TABLE OF TPSTDOUT, "   
lv_ev_tp_path  TYPE STPA-FILE, "   
lv_missing_parameter  TYPE STPA, "   
lv_iv_transport_request  TYPE STPA-TRKORR, "   
lv_iv_client  TYPE STPA-CLIENT, "   
lt_tt_buffer  TYPE STANDARD TABLE OF TPBUFFER, "   
lv_ev_rfc_message  TYPE STPA-MESSAGE, "   
lv_invalid_parameter  TYPE STPA, "   
lv_iv_umodes  TYPE STPA-UMODES, "   
lt_tt_params  TYPE STANDARD TABLE OF TPPARAMS, "   
lv_ev_tp_cmd_string  TYPE STPA-CMDSTRING, "   
lv_get_tpparam_failed  TYPE STPA, "   
lt_tt_logptr  TYPE STANDARD TABLE OF TPLOGPTR, "   
lv_iv_tp_options  TYPE STPA-OPTIONS, "   
lv_ev_tp_return_code  TYPE STPA-RETCODE, "   
lv_update_tp_destination_failed  TYPE STPA, "   
lt_tt_objlst  TYPE STANDARD TABLE OF TPOBJLST, "   
lv_iv_offline  TYPE STPA-FLAG, "   SPACE
lv_ev_tp_message  TYPE STPA-MESSAGE, "   
lv_get_tms_info_failed  TYPE STPA, "   
lv_ev_tp_version  TYPE STPA-VERSION, "   
lv_iv_tp_tpparam  TYPE STPA-FILE, "   
lv_permission_denied  TYPE STPA, "   
lv_ev_tp_alog  TYPE STPA-FILE, "   
lv_tp_call_failed  TYPE STPA, "   
lv_iv_tp_destination  TYPE RFCDEST. "   

  CALL FUNCTION 'OCS_TP_INTERFACE'  "
    EXPORTING
         IV_TP_COMMAND = lv_iv_tp_command
         IV_PRID_TEXT = lv_iv_prid_text
         IV_PRID_MIN = lv_iv_prid_min
         IV_PRID_MAX = lv_iv_prid_max
         IV_SYSTEM_NAME = lv_iv_system_name
         IV_TRANSPORT_REQUEST = lv_iv_transport_request
         IV_CLIENT = lv_iv_client
         IV_UMODES = lv_iv_umodes
         IV_TP_OPTIONS = lv_iv_tp_options
         IV_OFFLINE = lv_iv_offline
         IV_TP_TPPARAM = lv_iv_tp_tpparam
         IV_TP_DESTINATION = lv_iv_tp_destination
    IMPORTING
         EV_INTERFACE_VERSION = lv_ev_interface_version
         EV_TP_SLOG = lv_ev_tp_slog
         EV_TP_PID = lv_ev_tp_pid
         EV_BUFFER_COUNT = lv_ev_buffer_count
         EV_TPPARAM_PATH = lv_ev_tpparam_path
         EV_TP_PATH = lv_ev_tp_path
         EV_RFC_MESSAGE = lv_ev_rfc_message
         EV_TP_CMD_STRING = lv_ev_tp_cmd_string
         EV_TP_RETURN_CODE = lv_ev_tp_return_code
         EV_TP_MESSAGE = lv_ev_tp_message
         EV_TP_VERSION = lv_ev_tp_version
         EV_TP_ALOG = lv_ev_tp_alog
    TABLES
         TT_OPTIONS = lt_tt_options
         TT_ARGV = lt_tt_argv
         TT_STDOUT = lt_tt_stdout
         TT_BUFFER = lt_tt_buffer
         TT_PARAMS = lt_tt_params
         TT_LOGPTR = lt_tt_logptr
         TT_OBJLST = lt_tt_objlst
    EXCEPTIONS
        UNSUPPORTED_TP_COMMAND = 1
        INSERT_TPSTAT_FAILED = 10
        INSERT_TPLOG_FAILED = 11
        UNKNOWN_ERROR = 12
        INVALID_TP_COMMAND = 2
        MISSING_PARAMETER = 3
        INVALID_PARAMETER = 4
        GET_TPPARAM_FAILED = 5
        UPDATE_TP_DESTINATION_FAILED = 6
        GET_TMS_INFO_FAILED = 7
        PERMISSION_DENIED = 8
        TP_CALL_FAILED = 9
. " OCS_TP_INTERFACE




ABAP code using 7.40 inline data declarations to call FM OCS_TP_INTERFACE

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 COMMAND FROM STPA INTO @DATA(ld_iv_tp_command).
 
"SELECT single VERSION FROM STPA INTO @DATA(ld_ev_interface_version).
 
 
"SELECT single FILE FROM STPA INTO @DATA(ld_ev_tp_slog).
 
"SELECT single MESSAGE FROM STPA INTO @DATA(ld_iv_prid_text).
 
 
"SELECT single PID FROM STPA INTO @DATA(ld_ev_tp_pid).
 
 
 
DATA(ld_iv_prid_max) = 100.
 
 
"SELECT single COUNTER FROM STPA INTO @DATA(ld_ev_buffer_count).
 
 
"SELECT single SYSNAME FROM STPA INTO @DATA(ld_iv_system_name).
 
"SELECT single FILE FROM STPA INTO @DATA(ld_ev_tpparam_path).
 
 
 
"SELECT single FILE FROM STPA INTO @DATA(ld_ev_tp_path).
 
 
"SELECT single TRKORR FROM STPA INTO @DATA(ld_iv_transport_request).
 
"SELECT single CLIENT FROM STPA INTO @DATA(ld_iv_client).
 
 
"SELECT single MESSAGE FROM STPA INTO @DATA(ld_ev_rfc_message).
 
 
"SELECT single UMODES FROM STPA INTO @DATA(ld_iv_umodes).
 
 
"SELECT single CMDSTRING FROM STPA INTO @DATA(ld_ev_tp_cmd_string).
 
 
 
"SELECT single OPTIONS FROM STPA INTO @DATA(ld_iv_tp_options).
 
"SELECT single RETCODE FROM STPA INTO @DATA(ld_ev_tp_return_code).
 
 
 
"SELECT single FLAG FROM STPA INTO @DATA(ld_iv_offline).
DATA(ld_iv_offline) = ' '.
 
"SELECT single MESSAGE FROM STPA INTO @DATA(ld_ev_tp_message).
 
 
"SELECT single VERSION FROM STPA INTO @DATA(ld_ev_tp_version).
 
"SELECT single FILE FROM STPA INTO @DATA(ld_iv_tp_tpparam).
 
 
"SELECT single FILE FROM STPA INTO @DATA(ld_ev_tp_alog).
 
 
 


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!