SAP BAPI_DELETE_WCDT Function Module for delete detail records and header record for WC Downtime









BAPI_DELETE_WCDT is a standard bapi delete wcdt SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for delete detail records and header record for WC Downtime 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 bapi delete wcdt FM, simply by entering the name BAPI_DELETE_WCDT into the relevant SAP transaction such as SE37 or SE38.

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



Function BAPI_DELETE_WCDT 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 'BAPI_DELETE_WCDT'"delete detail records and header record for WC Downtime
EXPORTING
WL_NO = "Well Number
WC_NO = "Well Completion Number
STRM_TYPE_CD = "Stream Type Code
HOUR_FL = "Hour indictor
EFF_FROM_DT = "Effective from date
EFF_FROM_TM = "effective from time

IMPORTING
HEADER_WCDT = "header information

TABLES
RETURN = "return messages
* DETAIL_WCDT_TB = "detail information
.



IMPORTING Parameters details for BAPI_DELETE_WCDT

WL_NO - Well Number

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

WC_NO - Well Completion Number

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

STRM_TYPE_CD - Stream Type Code

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

HOUR_FL - Hour indictor

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

EFF_FROM_DT - Effective from date

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

EFF_FROM_TM - effective from time

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

EXPORTING Parameters details for BAPI_DELETE_WCDT

HEADER_WCDT - header information

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

TABLES Parameters details for BAPI_DELETE_WCDT

RETURN - return messages

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

DETAIL_WCDT_TB - detail information

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

Copy and paste ABAP code example for BAPI_DELETE_WCDT 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_wl_no  TYPE BAPI_OIU_WCDT-WL_NO, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_header_wcdt  TYPE BAPI_OIU_WCDT, "   
lv_wc_no  TYPE BAPI_OIU_WCDT-WC_NO, "   
lt_detail_wcdt_tb  TYPE STANDARD TABLE OF BAPI_OIU_WCDT_1, "   
lv_strm_type_cd  TYPE BAPI_OIU_WCDT-STRM_TYPE_CD, "   
lv_hour_fl  TYPE BAPI_OIU_WCDT-HOUR_FL, "   
lv_eff_from_dt  TYPE BAPI_OIU_WCDT-EFF_FROM_DT, "   
lv_eff_from_tm  TYPE BAPI_OIU_WCDT-EFF_FROM_TM. "   

  CALL FUNCTION 'BAPI_DELETE_WCDT'  "delete detail records and header record for WC Downtime
    EXPORTING
         WL_NO = lv_wl_no
         WC_NO = lv_wc_no
         STRM_TYPE_CD = lv_strm_type_cd
         HOUR_FL = lv_hour_fl
         EFF_FROM_DT = lv_eff_from_dt
         EFF_FROM_TM = lv_eff_from_tm
    IMPORTING
         HEADER_WCDT = lv_header_wcdt
    TABLES
         RETURN = lt_return
         DETAIL_WCDT_TB = lt_detail_wcdt_tb
. " BAPI_DELETE_WCDT




ABAP code using 7.40 inline data declarations to call FM BAPI_DELETE_WCDT

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 WL_NO FROM BAPI_OIU_WCDT INTO @DATA(ld_wl_no).
 
 
 
"SELECT single WC_NO FROM BAPI_OIU_WCDT INTO @DATA(ld_wc_no).
 
 
"SELECT single STRM_TYPE_CD FROM BAPI_OIU_WCDT INTO @DATA(ld_strm_type_cd).
 
"SELECT single HOUR_FL FROM BAPI_OIU_WCDT INTO @DATA(ld_hour_fl).
 
"SELECT single EFF_FROM_DT FROM BAPI_OIU_WCDT INTO @DATA(ld_eff_from_dt).
 
"SELECT single EFF_FROM_TM FROM BAPI_OIU_WCDT INTO @DATA(ld_eff_from_tm).
 


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!