SAP OCS_API_GET_LOG_NAMES Function Module for









OCS_API_GET_LOG_NAMES is a standard ocs api get log names 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 api get log names FM, simply by entering the name OCS_API_GET_LOG_NAMES into the relevant SAP transaction such as SE37 or SE38.

Function Group: OCS_API
Program Name: SAPLOCS_API
Main Program: SAPLOCS_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function OCS_API_GET_LOG_NAMES 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_API_GET_LOG_NAMES'"
EXPORTING
* IV_REQID = "
* IV_TRKORR = "
* IV_TP_STEP = 'R' "
* IV_SYSID = SY-SYSID "

IMPORTING
EV_RC = "
EV_MESSAGE = "
ES_MESSAGE = "
ET_LOGFILES = "
.



IMPORTING Parameters details for OCS_API_GET_LOG_NAMES

IV_REQID -

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

IV_TRKORR -

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

IV_TP_STEP -

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

IV_SYSID -

Data type: SYSYSID
Default: SY-SYSID
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for OCS_API_GET_LOG_NAMES

EV_RC -

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

EV_MESSAGE -

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

ES_MESSAGE -

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

ET_LOGFILES -

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

Copy and paste ABAP code example for OCS_API_GET_LOG_NAMES 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_ev_rc  TYPE OCSAPI_PA-RC, "   
lv_iv_reqid  TYPE QUEUE_ID, "   
lv_iv_trkorr  TYPE TRKORR, "   
lv_ev_message  TYPE OCSAPI_PA-RC_MESSAGE, "   
lv_es_message  TYPE OCS_APIMSG, "   
lv_iv_tp_step  TYPE CHAR_LG_01, "   'R'
lv_iv_sysid  TYPE SYSYSID, "   SY-SYSID
lv_et_logfiles  TYPE OCS_API_T_LOGFILE. "   

  CALL FUNCTION 'OCS_API_GET_LOG_NAMES'  "
    EXPORTING
         IV_REQID = lv_iv_reqid
         IV_TRKORR = lv_iv_trkorr
         IV_TP_STEP = lv_iv_tp_step
         IV_SYSID = lv_iv_sysid
    IMPORTING
         EV_RC = lv_ev_rc
         EV_MESSAGE = lv_ev_message
         ES_MESSAGE = lv_es_message
         ET_LOGFILES = lv_et_logfiles
. " OCS_API_GET_LOG_NAMES




ABAP code using 7.40 inline data declarations to call FM OCS_API_GET_LOG_NAMES

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 RC FROM OCSAPI_PA INTO @DATA(ld_ev_rc).
 
 
 
"SELECT single RC_MESSAGE FROM OCSAPI_PA INTO @DATA(ld_ev_message).
 
 
DATA(ld_iv_tp_step) = 'R'.
 
DATA(ld_iv_sysid) = SY-SYSID.
 
 


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!