SAP ISM_SD_SELECT_CONTRACTS Function Module for IS-M: Contract Selection
ISM_SD_SELECT_CONTRACTS is a standard ism sd select contracts 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: Contract Selection 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 select contracts FM, simply by entering the name ISM_SD_SELECT_CONTRACTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: JKSDORDER12
Program Name: SAPLJKSDORDER12
Main Program: SAPLJKSDORDER12
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISM_SD_SELECT_CONTRACTS 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_SELECT_CONTRACTS'"IS-M: Contract Selection.
EXPORTING
* IN_ISSUE = "Select Media Issues
* IN_VALID_FROM = "Contract Valid From
* IN_VALID_UNTIL = "Contract Valid To
* X_PARTNER_OR = ' ' "
* X_UPDATE_CONTRACT = ' ' "
* IN_NOT_CANCELED = ' ' "Check for Contracts Not Rejected
* IN_SELECT_ALL_CONTRACTS = '' "
* IN_GENGROUP = "Generation Group
* IN_XMARAEXIST = 'X' "
IMPORTING
OUT_CONTRACT_HEAD_TAB = "
TABLES
* IN_VKORG = "
* IN_WHOLESALER = "
* IN_DOC_TYPE_CONTRACT = "
* IN_PRODUCT = "
* IN_ROUTE = "
* IN_PLANT = "
* IN_VSTEL = "
* IN_PSTYV = "IS-M: Range for Item Category
* OUT_CONTRACT = "
* OUT_CONTRACT2 = "IS-M: Contracts
* IN_VTWEG = "
* IN_SPART = "
* IN_VKBUR = "
* IN_VKGRP = "
* IN_CONTRACT = "
* IN_POSNR = "
* IN_SHIP_TO_PARTY = "
* IN_SOLD_TO_PARTY = "
IMPORTING Parameters details for ISM_SD_SELECT_CONTRACTS
IN_ISSUE - Select Media Issues
Data type: RJKSDISSUE_TABOptional: Yes
Call by Reference: Yes
IN_VALID_FROM - Contract Valid From
Data type: SY-DATUMOptional: Yes
Call by Reference: Yes
IN_VALID_UNTIL - Contract Valid To
Data type: SY-DATUMOptional: Yes
Call by Reference: Yes
X_PARTNER_OR -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
X_UPDATE_CONTRACT -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
IN_NOT_CANCELED - Check for Contracts Not Rejected
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: Yes
IN_SELECT_ALL_CONTRACTS -
Data type: XFELDDefault: ''
Optional: Yes
Call by Reference: Yes
IN_GENGROUP - Generation Group
Data type: JKSECONTRINDEX-GENGROUPOptional: Yes
Call by Reference: Yes
IN_XMARAEXIST -
Data type: JPTMG0-XMARAEXISTDefault: 'X'
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ISM_SD_SELECT_CONTRACTS
OUT_CONTRACT_HEAD_TAB -
Data type: JKSDVBELN_TABOptional: No
Call by Reference: Yes
TABLES Parameters details for ISM_SD_SELECT_CONTRACTS
IN_VKORG -
Data type: RJKSD_VKORG_RANGEOptional: Yes
Call by Reference: Yes
IN_WHOLESALER -
Data type: RJKSD_BP_RANGEOptional: Yes
Call by Reference: Yes
IN_DOC_TYPE_CONTRACT -
Data type: RJKSD_AUART_RANGEOptional: Yes
Call by Reference: Yes
IN_PRODUCT -
Data type: RJKSD_ISSUE_RANGEOptional: Yes
Call by Reference: Yes
IN_ROUTE -
Data type: RJKSD_ROUTE_RANGEOptional: Yes
Call by Reference: Yes
IN_PLANT -
Data type: RJKSD_WERK_RANGEOptional: Yes
Call by Reference: Yes
IN_VSTEL -
Data type: RJKSD_VSTEL_RANGEOptional: Yes
Call by Reference: Yes
IN_PSTYV - IS-M: Range for Item Category
Data type: RJKSD_PSTYV_RANGEOptional: Yes
Call by Reference: Yes
OUT_CONTRACT -
Data type: RJKSDCONTRACTOptional: Yes
Call by Reference: Yes
OUT_CONTRACT2 - IS-M: Contracts
Data type: JKSECONTRINDEXOptional: Yes
Call by Reference: Yes
IN_VTWEG -
Data type: RJKSD_VTWEG_RANGEOptional: Yes
Call by Reference: Yes
IN_SPART -
Data type: RJKSD_SPART_RANGEOptional: Yes
Call by Reference: Yes
IN_VKBUR -
Data type: RJKSD_VKBUR_RANGEOptional: Yes
Call by Reference: Yes
IN_VKGRP -
Data type: RJKSD_VKGRP_RANGEOptional: Yes
Call by Reference: Yes
IN_CONTRACT -
Data type: RJKSD_VBELN_RANGEOptional: Yes
Call by Reference: Yes
IN_POSNR -
Data type: RJKSD_POSNR_RANGEOptional: Yes
Call by Reference: Yes
IN_SHIP_TO_PARTY -
Data type: RJKSD_BP_RANGEOptional: Yes
Call by Reference: Yes
IN_SOLD_TO_PARTY -
Data type: RJKSD_BP_RANGEOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for ISM_SD_SELECT_CONTRACTS 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_issue | TYPE RJKSDISSUE_TAB, " | |||
| lt_in_vkorg | TYPE STANDARD TABLE OF RJKSD_VKORG_RANGE, " | |||
| lv_out_contract_head_tab | TYPE JKSDVBELN_TAB, " | |||
| lt_in_wholesaler | TYPE STANDARD TABLE OF RJKSD_BP_RANGE, " | |||
| lt_in_doc_type_contract | TYPE STANDARD TABLE OF RJKSD_AUART_RANGE, " | |||
| lt_in_product | TYPE STANDARD TABLE OF RJKSD_ISSUE_RANGE, " | |||
| lt_in_route | TYPE STANDARD TABLE OF RJKSD_ROUTE_RANGE, " | |||
| lt_in_plant | TYPE STANDARD TABLE OF RJKSD_WERK_RANGE, " | |||
| lt_in_vstel | TYPE STANDARD TABLE OF RJKSD_VSTEL_RANGE, " | |||
| lt_in_pstyv | TYPE STANDARD TABLE OF RJKSD_PSTYV_RANGE, " | |||
| lt_out_contract | TYPE STANDARD TABLE OF RJKSDCONTRACT, " | |||
| lt_out_contract2 | TYPE STANDARD TABLE OF JKSECONTRINDEX, " | |||
| lt_in_vtweg | TYPE STANDARD TABLE OF RJKSD_VTWEG_RANGE, " | |||
| lv_in_valid_from | TYPE SY-DATUM, " | |||
| lt_in_spart | TYPE STANDARD TABLE OF RJKSD_SPART_RANGE, " | |||
| lv_in_valid_until | TYPE SY-DATUM, " | |||
| lt_in_vkbur | TYPE STANDARD TABLE OF RJKSD_VKBUR_RANGE, " | |||
| lv_x_partner_or | TYPE XFELD, " SPACE | |||
| lt_in_vkgrp | TYPE STANDARD TABLE OF RJKSD_VKGRP_RANGE, " | |||
| lv_x_update_contract | TYPE XFELD, " SPACE | |||
| lt_in_contract | TYPE STANDARD TABLE OF RJKSD_VBELN_RANGE, " | |||
| lv_in_not_canceled | TYPE XFELD, " SPACE | |||
| lt_in_posnr | TYPE STANDARD TABLE OF RJKSD_POSNR_RANGE, " | |||
| lv_in_select_all_contracts | TYPE XFELD, " '' | |||
| lv_in_gengroup | TYPE JKSECONTRINDEX-GENGROUP, " | |||
| lt_in_ship_to_party | TYPE STANDARD TABLE OF RJKSD_BP_RANGE, " | |||
| lv_in_xmaraexist | TYPE JPTMG0-XMARAEXIST, " 'X' | |||
| lt_in_sold_to_party | TYPE STANDARD TABLE OF RJKSD_BP_RANGE. " |
|   CALL FUNCTION 'ISM_SD_SELECT_CONTRACTS' "IS-M: Contract Selection |
| EXPORTING | ||
| IN_ISSUE | = lv_in_issue | |
| IN_VALID_FROM | = lv_in_valid_from | |
| IN_VALID_UNTIL | = lv_in_valid_until | |
| X_PARTNER_OR | = lv_x_partner_or | |
| X_UPDATE_CONTRACT | = lv_x_update_contract | |
| IN_NOT_CANCELED | = lv_in_not_canceled | |
| IN_SELECT_ALL_CONTRACTS | = lv_in_select_all_contracts | |
| IN_GENGROUP | = lv_in_gengroup | |
| IN_XMARAEXIST | = lv_in_xmaraexist | |
| IMPORTING | ||
| OUT_CONTRACT_HEAD_TAB | = lv_out_contract_head_tab | |
| TABLES | ||
| IN_VKORG | = lt_in_vkorg | |
| IN_WHOLESALER | = lt_in_wholesaler | |
| IN_DOC_TYPE_CONTRACT | = lt_in_doc_type_contract | |
| IN_PRODUCT | = lt_in_product | |
| IN_ROUTE | = lt_in_route | |
| IN_PLANT | = lt_in_plant | |
| IN_VSTEL | = lt_in_vstel | |
| IN_PSTYV | = lt_in_pstyv | |
| OUT_CONTRACT | = lt_out_contract | |
| OUT_CONTRACT2 | = lt_out_contract2 | |
| IN_VTWEG | = lt_in_vtweg | |
| IN_SPART | = lt_in_spart | |
| IN_VKBUR | = lt_in_vkbur | |
| IN_VKGRP | = lt_in_vkgrp | |
| IN_CONTRACT | = lt_in_contract | |
| IN_POSNR | = lt_in_posnr | |
| IN_SHIP_TO_PARTY | = lt_in_ship_to_party | |
| IN_SOLD_TO_PARTY | = lt_in_sold_to_party | |
| . " ISM_SD_SELECT_CONTRACTS | ||
ABAP code using 7.40 inline data declarations to call FM ISM_SD_SELECT_CONTRACTS
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 DATUM FROM SY INTO @DATA(ld_in_valid_from). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_in_valid_until). | ||||
| DATA(ld_x_partner_or) | = ' '. | |||
| DATA(ld_x_update_contract) | = ' '. | |||
| DATA(ld_in_not_canceled) | = ' '. | |||
| DATA(ld_in_select_all_contracts) | = ''. | |||
| "SELECT single GENGROUP FROM JKSECONTRINDEX INTO @DATA(ld_in_gengroup). | ||||
| "SELECT single XMARAEXIST FROM JPTMG0 INTO @DATA(ld_in_xmaraexist). | ||||
| DATA(ld_in_xmaraexist) | = 'X'. | |||
Search for further information about these or an SAP related objects