SAP ISM_CONTRACTDEMAND_SET Function Module for IS-M: Transfer Plan Quantities from External System
ISM_CONTRACTDEMAND_SET is a standard ism contractdemand set SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IS-M: Transfer Plan Quantities from External System 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 contractdemand set FM, simply by entering the name ISM_CONTRACTDEMAND_SET into the relevant SAP transaction such as SE37 or SE38.
Function Group: JKSDDEMAND01
Program Name: SAPLJKSDDEMAND01
Main Program: SAPLJKSDDEMAND01
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISM_CONTRACTDEMAND_SET 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_CONTRACTDEMAND_SET'"IS-M: Transfer Plan Quantities from External System.
EXPORTING
IN_DOCUMENT = "Sales Document
* IN_PHASEMDL = "IS-M: Phase Model in Phase Delivery
* IN_PHASENBR = "IS-M: Sequence Number in Phase Delivery
* IN_QUANTITYEXTENSION = "
* IN_UPDATEFLAGS = "IS-M: Quantity Planning Fields: Update Indicator
IN_ITEM = "Sales document item
IN_MEDIAISSUE = "IS-M: Media Issue
IN_QUANTITY = "Target quantity in sales units
* IN_SALESUNIT = "Sales Unit
* IN_SALESUNIT_ISO = "Target Quantity Unit of Measure in ISO Code
* IN_UPDATETASK = JYDB_UPDATE_NO "
* IN_ORIGINOFDATA = "IS-M: Origin of Quantity
* IN_VERSION = '000 ' "IS-M/SD: Requirements Planning Version
TABLES
* RETURN = "Return Parameter(s)
EXCEPTIONS
ERROR = 1
IMPORTING Parameters details for ISM_CONTRACTDEMAND_SET
IN_DOCUMENT - Sales Document
Data type: JKSDDEMAND-VBELNOptional: No
Call by Reference: No ( called with pass by value option)
IN_PHASEMDL - IS-M: Phase Model in Phase Delivery
Data type: JVPHASEMDLOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_PHASENBR - IS-M: Sequence Number in Phase Delivery
Data type: JVPHASENBROptional: Yes
Call by Reference: No ( called with pass by value option)
IN_QUANTITYEXTENSION -
Data type: BAPIDEMANDSETOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_UPDATEFLAGS - IS-M: Quantity Planning Fields: Update Indicator
Data type: BAPIDEMANDSETXOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_ITEM - Sales document item
Data type: JKSDDEMAND-POSNROptional: No
Call by Reference: No ( called with pass by value option)
IN_MEDIAISSUE - IS-M: Media Issue
Data type: JKSDDEMAND-ISSUEOptional: No
Call by Reference: No ( called with pass by value option)
IN_QUANTITY - Target quantity in sales units
Data type: JKSDDEMAND-QUANTITYOptional: No
Call by Reference: No ( called with pass by value option)
IN_SALESUNIT - Sales Unit
Data type: JKSDDEMAND-UNITOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_SALESUNIT_ISO - Target Quantity Unit of Measure in ISO Code
Data type: BAPIJKSDDEMAND01-T_UNIT_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_UPDATETASK -
Data type: JYDB_UPDATE_TYPEDefault: JYDB_UPDATE_NO
Optional: Yes
Call by Reference: No ( called with pass by value option)
IN_ORIGINOFDATA - IS-M: Origin of Quantity
Data type: JKSDDEMAND-ORIGINOFDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
IN_VERSION - IS-M/SD: Requirements Planning Version
Data type: JKSDDEMAND-VERSIONDefault: '000 '
Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ISM_CONTRACTDEMAND_SET
RETURN - Return Parameter(s)
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXCEPTIONS details
ERROR - Error Occurred During Processing
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ISM_CONTRACTDEMAND_SET 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_error | TYPE STRING, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_in_document | TYPE JKSDDEMAND-VBELN, " | |||
| lv_in_phasemdl | TYPE JVPHASEMDL, " | |||
| lv_in_phasenbr | TYPE JVPHASENBR, " | |||
| lv_in_quantityextension | TYPE BAPIDEMANDSET, " | |||
| lv_in_updateflags | TYPE BAPIDEMANDSETX, " | |||
| lv_in_item | TYPE JKSDDEMAND-POSNR, " | |||
| lv_in_mediaissue | TYPE JKSDDEMAND-ISSUE, " | |||
| lv_in_quantity | TYPE JKSDDEMAND-QUANTITY, " | |||
| lv_in_salesunit | TYPE JKSDDEMAND-UNIT, " | |||
| lv_in_salesunit_iso | TYPE BAPIJKSDDEMAND01-T_UNIT_ISO, " | |||
| lv_in_updatetask | TYPE JYDB_UPDATE_TYPE, " JYDB_UPDATE_NO | |||
| lv_in_originofdata | TYPE JKSDDEMAND-ORIGINOFDATA, " | |||
| lv_in_version | TYPE JKSDDEMAND-VERSION. " '000 ' |
|   CALL FUNCTION 'ISM_CONTRACTDEMAND_SET' "IS-M: Transfer Plan Quantities from External System |
| EXPORTING | ||
| IN_DOCUMENT | = lv_in_document | |
| IN_PHASEMDL | = lv_in_phasemdl | |
| IN_PHASENBR | = lv_in_phasenbr | |
| IN_QUANTITYEXTENSION | = lv_in_quantityextension | |
| IN_UPDATEFLAGS | = lv_in_updateflags | |
| IN_ITEM | = lv_in_item | |
| IN_MEDIAISSUE | = lv_in_mediaissue | |
| IN_QUANTITY | = lv_in_quantity | |
| IN_SALESUNIT | = lv_in_salesunit | |
| IN_SALESUNIT_ISO | = lv_in_salesunit_iso | |
| IN_UPDATETASK | = lv_in_updatetask | |
| IN_ORIGINOFDATA | = lv_in_originofdata | |
| IN_VERSION | = lv_in_version | |
| TABLES | ||
| RETURN | = lt_return | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| . " ISM_CONTRACTDEMAND_SET | ||
ABAP code using 7.40 inline data declarations to call FM ISM_CONTRACTDEMAND_SET
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 VBELN FROM JKSDDEMAND INTO @DATA(ld_in_document). | ||||
| "SELECT single POSNR FROM JKSDDEMAND INTO @DATA(ld_in_item). | ||||
| "SELECT single ISSUE FROM JKSDDEMAND INTO @DATA(ld_in_mediaissue). | ||||
| "SELECT single QUANTITY FROM JKSDDEMAND INTO @DATA(ld_in_quantity). | ||||
| "SELECT single UNIT FROM JKSDDEMAND INTO @DATA(ld_in_salesunit). | ||||
| "SELECT single T_UNIT_ISO FROM BAPIJKSDDEMAND01 INTO @DATA(ld_in_salesunit_iso). | ||||
| DATA(ld_in_updatetask) | = JYDB_UPDATE_NO. | |||
| "SELECT single ORIGINOFDATA FROM JKSDDEMAND INTO @DATA(ld_in_originofdata). | ||||
| "SELECT single VERSION FROM JKSDDEMAND INTO @DATA(ld_in_version). | ||||
| DATA(ld_in_version) | = '000 '. | |||
Search for further information about these or an SAP related objects