SAP ISM_SD_DELETE_DEMAND_CONTRACT Function Module for Delete Planning Records for a Contract









ISM_SD_DELETE_DEMAND_CONTRACT is a standard ism sd delete demand contract 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 Planning Records for a Contract 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 ism sd delete demand contract FM, simply by entering the name ISM_SD_DELETE_DEMAND_CONTRACT into the relevant SAP transaction such as SE37 or SE38.

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



Function ISM_SD_DELETE_DEMAND_CONTRACT 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 'ISM_SD_DELETE_DEMAND_CONTRACT'"Delete Planning Records for a Contract
EXPORTING
* IN_VERSION = GC_ACTIVE_VERSION "IS-M: Quantity Plan Version
IN_VBELN = "Sales and Distribution Document Number
IN_POSNR = "Item Number of Sales Document
IN_NO_LOCK = "
* IN_FLAG_HORIZONT = "Take Account of Planning Horizon
* IN_FLAG_READ_BUFFER = "
* IN_XPROMOTIONS_EXCLUSION = 'X' "
* IN_UPDATETASK = ' ' "

IMPORTING
OUT_DEMAND_DELETED = "IS-M: Table - Reference Structure for JKSDDEMAND
OUT_RETURN_TAB = "IS-M: BAPIRET2 Table

EXCEPTIONS
ISSUE_NOT_ASSIGNED = 1 MISSING_SEQUENCE = 2 ENQUEUE_FAILED = 3 ERROR = 4 ERROR_READING_CONTRACT = 5
.



IMPORTING Parameters details for ISM_SD_DELETE_DEMAND_CONTRACT

IN_VERSION - IS-M: Quantity Plan Version

Data type: JSDVERSION
Default: GC_ACTIVE_VERSION
Optional: No
Call by Reference: Yes

IN_VBELN - Sales and Distribution Document Number

Data type: VBAK-VBELN
Optional: No
Call by Reference: Yes

IN_POSNR - Item Number of Sales Document

Data type: VBAP-POSNR
Optional: No
Call by Reference: Yes

IN_NO_LOCK -

Data type: XFELD
Optional: No
Call by Reference: Yes

IN_FLAG_HORIZONT - Take Account of Planning Horizon

Data type: XFELD
Optional: Yes
Call by Reference: Yes

IN_FLAG_READ_BUFFER -

Data type: XFELD
Optional: Yes
Call by Reference: Yes

IN_XPROMOTIONS_EXCLUSION -

Data type: XFELD
Default: 'X'
Optional: Yes
Call by Reference: Yes

IN_UPDATETASK -

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

EXPORTING Parameters details for ISM_SD_DELETE_DEMAND_CONTRACT

OUT_DEMAND_DELETED - IS-M: Table - Reference Structure for JKSDDEMAND

Data type: JKSDDEMAND_TAB
Optional: No
Call by Reference: Yes

OUT_RETURN_TAB - IS-M: BAPIRET2 Table

Data type: BAPIRET2TAB
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ISSUE_NOT_ASSIGNED -

Data type:
Optional: No
Call by Reference: Yes

MISSING_SEQUENCE -

Data type:
Optional: No
Call by Reference: Yes

ENQUEUE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

ERROR -

Data type:
Optional: No
Call by Reference: Yes

ERROR_READING_CONTRACT -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ISM_SD_DELETE_DEMAND_CONTRACT 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_in_version  TYPE JSDVERSION, "   GC_ACTIVE_VERSION
lv_issue_not_assigned  TYPE JSDVERSION, "   
lv_out_demand_deleted  TYPE JKSDDEMAND_TAB, "   
lv_in_vbeln  TYPE VBAK-VBELN, "   
lv_out_return_tab  TYPE BAPIRET2TAB, "   
lv_missing_sequence  TYPE BAPIRET2TAB, "   
lv_in_posnr  TYPE VBAP-POSNR, "   
lv_enqueue_failed  TYPE VBAP, "   
lv_error  TYPE VBAP, "   
lv_in_no_lock  TYPE XFELD, "   
lv_in_flag_horizont  TYPE XFELD, "   
lv_error_reading_contract  TYPE XFELD, "   
lv_in_flag_read_buffer  TYPE XFELD, "   
lv_in_xpromotions_exclusion  TYPE XFELD, "   'X'
lv_in_updatetask  TYPE XFELD. "   SPACE

  CALL FUNCTION 'ISM_SD_DELETE_DEMAND_CONTRACT'  "Delete Planning Records for a Contract
    EXPORTING
         IN_VERSION = lv_in_version
         IN_VBELN = lv_in_vbeln
         IN_POSNR = lv_in_posnr
         IN_NO_LOCK = lv_in_no_lock
         IN_FLAG_HORIZONT = lv_in_flag_horizont
         IN_FLAG_READ_BUFFER = lv_in_flag_read_buffer
         IN_XPROMOTIONS_EXCLUSION = lv_in_xpromotions_exclusion
         IN_UPDATETASK = lv_in_updatetask
    IMPORTING
         OUT_DEMAND_DELETED = lv_out_demand_deleted
         OUT_RETURN_TAB = lv_out_return_tab
    EXCEPTIONS
        ISSUE_NOT_ASSIGNED = 1
        MISSING_SEQUENCE = 2
        ENQUEUE_FAILED = 3
        ERROR = 4
        ERROR_READING_CONTRACT = 5
. " ISM_SD_DELETE_DEMAND_CONTRACT




ABAP code using 7.40 inline data declarations to call FM ISM_SD_DELETE_DEMAND_CONTRACT

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.

DATA(ld_in_version) = GC_ACTIVE_VERSION.
 
 
 
"SELECT single VBELN FROM VBAK INTO @DATA(ld_in_vbeln).
 
 
 
"SELECT single POSNR FROM VBAP INTO @DATA(ld_in_posnr).
 
 
 
 
 
 
 
DATA(ld_in_xpromotions_exclusion) = 'X'.
 
DATA(ld_in_updatetask) = ' '.
 


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!