SAP OIK_DELOG_DOCUMENT Function Module for Log table - Delete shared documents









OIK_DELOG_DOCUMENT is a standard oik delog document SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Log table - Delete shared documents processing and below is the pattern details for this FM, 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 oik delog document FM, simply by entering the name OIK_DELOG_DOCUMENT into the relevant SAP transaction such as SE37 or SE38.

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



Function OIK_DELOG_DOCUMENT 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 'OIK_DELOG_DOCUMENT'"Log table - Delete shared documents
EXPORTING
* I_DOC_TYP = 'J' "SD document category
I_DOC_NR = "SD document number
* I_USER = SY-UNAME "system user from SAP logon
* I_DATE = SY-DATUM "system date
* I_LOG_MODE = 'S' "status of SD document

EXCEPTIONS
DELETE_FAILED = 1
.



IMPORTING Parameters details for OIK_DELOG_DOCUMENT

I_DOC_TYP - SD document category

Data type: OIKSSL-DOCTYP
Default: 'J'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DOC_NR - SD document number

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

I_USER - system user from SAP logon

Data type: OIKSSL-LOG_USER
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DATE - system date

Data type: OIKSSL-LOG_DATE
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LOG_MODE - status of SD document

Data type: OIKSSL-LOG_MODE
Default: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

DELETE_FAILED - delete of a log table entry failed

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

Copy and paste ABAP code example for OIK_DELOG_DOCUMENT 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_i_doc_typ  TYPE OIKSSL-DOCTYP, "   'J'
lv_delete_failed  TYPE OIKSSL, "   
lv_i_doc_nr  TYPE OIKSSL-DOCNR, "   
lv_i_user  TYPE OIKSSL-LOG_USER, "   SY-UNAME
lv_i_date  TYPE OIKSSL-LOG_DATE, "   SY-DATUM
lv_i_log_mode  TYPE OIKSSL-LOG_MODE. "   'S'

  CALL FUNCTION 'OIK_DELOG_DOCUMENT'  "Log table - Delete shared documents
    EXPORTING
         I_DOC_TYP = lv_i_doc_typ
         I_DOC_NR = lv_i_doc_nr
         I_USER = lv_i_user
         I_DATE = lv_i_date
         I_LOG_MODE = lv_i_log_mode
    EXCEPTIONS
        DELETE_FAILED = 1
. " OIK_DELOG_DOCUMENT




ABAP code using 7.40 inline data declarations to call FM OIK_DELOG_DOCUMENT

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 DOCTYP FROM OIKSSL INTO @DATA(ld_i_doc_typ).
DATA(ld_i_doc_typ) = 'J'.
 
 
"SELECT single DOCNR FROM OIKSSL INTO @DATA(ld_i_doc_nr).
 
"SELECT single LOG_USER FROM OIKSSL INTO @DATA(ld_i_user).
DATA(ld_i_user) = SY-UNAME.
 
"SELECT single LOG_DATE FROM OIKSSL INTO @DATA(ld_i_date).
DATA(ld_i_date) = SY-DATUM.
 
"SELECT single LOG_MODE FROM OIKSSL INTO @DATA(ld_i_log_mode).
DATA(ld_i_log_mode) = 'S'.
 


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!