SAP ISM_2SD_CONTRACT_CREATE Function Module for Contract Item from Delivery Viability Set, Unloading Point, Publication
ISM_2SD_CONTRACT_CREATE is a standard ism 2sd contract create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Contract Item from Delivery Viability Set, Unloading Point, Publication 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 2sd contract create FM, simply by entering the name ISM_2SD_CONTRACT_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: JMSD2SD
Program Name: SAPLJMSD2SD
Main Program: SAPLJMSD2SD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISM_2SD_CONTRACT_CREATE 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_2SD_CONTRACT_CREATE'"Contract Item from Delivery Viability Set, Unloading Point, Publication.
EXPORTING
IN_BEABLST = "IS-M: Unloading Point
* IN_BEZIRK = "Carrier Route
IN_DRERZ = "Publication
IN_PVA = "Edition
IN_VKORG = "Sales Organization
IN_VTWEG = "Distribution Channel
IMPORTING
OUT_VBELN = "Contract Number
OUT_POSNR = "Item Number in Contract
TABLES
RETURN = "IS-M/SD: Internal Structure for Transferring Error Messages
EXCEPTIONS
PUBLICATION_NOT_FOUND = 1 UNLOADING_POINT_NOT_FOUND = 2 BUSINESS_PARTNER_NOT_FOUND = 3 ATTRIBUTES_ERROR = 4 CONTRACT_ERROR = 5
IMPORTING Parameters details for ISM_2SD_CONTRACT_CREATE
IN_BEABLST - IS-M: Unloading Point
Data type: BEABLSTOptional: No
Call by Reference: Yes
IN_BEZIRK - Carrier Route
Data type: BEZIRKOptional: Yes
Call by Reference: Yes
IN_DRERZ - Publication
Data type: DRERZOptional: No
Call by Reference: Yes
IN_PVA - Edition
Data type: PVAOptional: No
Call by Reference: Yes
IN_VKORG - Sales Organization
Data type: VKORGOptional: No
Call by Reference: Yes
IN_VTWEG - Distribution Channel
Data type: VTWEGOptional: No
Call by Reference: Yes
EXPORTING Parameters details for ISM_2SD_CONTRACT_CREATE
OUT_VBELN - Contract Number
Data type: JVBELNCONTRACTOptional: No
Call by Reference: Yes
OUT_POSNR - Item Number in Contract
Data type: JPOSNRCONTRACTOptional: No
Call by Reference: Yes
TABLES Parameters details for ISM_2SD_CONTRACT_CREATE
RETURN - IS-M/SD: Internal Structure for Transferring Error Messages
Data type: RJMSGOptional: No
Call by Reference: Yes
EXCEPTIONS details
PUBLICATION_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
UNLOADING_POINT_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
BUSINESS_PARTNER_NOT_FOUND - Business Partner Not Found
Data type:Optional: No
Call by Reference: Yes
ATTRIBUTES_ERROR -
Data type:Optional: No
Call by Reference: Yes
CONTRACT_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ISM_2SD_CONTRACT_CREATE 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: | ||||
| lt_return | TYPE STANDARD TABLE OF RJMSG, " | |||
| lv_out_vbeln | TYPE JVBELNCONTRACT, " | |||
| lv_in_beablst | TYPE BEABLST, " | |||
| lv_publication_not_found | TYPE BEABLST, " | |||
| lv_in_bezirk | TYPE BEZIRK, " | |||
| lv_out_posnr | TYPE JPOSNRCONTRACT, " | |||
| lv_unloading_point_not_found | TYPE JPOSNRCONTRACT, " | |||
| lv_in_drerz | TYPE DRERZ, " | |||
| lv_business_partner_not_found | TYPE DRERZ, " | |||
| lv_in_pva | TYPE PVA, " | |||
| lv_attributes_error | TYPE PVA, " | |||
| lv_in_vkorg | TYPE VKORG, " | |||
| lv_contract_error | TYPE VKORG, " | |||
| lv_in_vtweg | TYPE VTWEG. " |
|   CALL FUNCTION 'ISM_2SD_CONTRACT_CREATE' "Contract Item from Delivery Viability Set, Unloading Point, Publication |
| EXPORTING | ||
| IN_BEABLST | = lv_in_beablst | |
| IN_BEZIRK | = lv_in_bezirk | |
| IN_DRERZ | = lv_in_drerz | |
| IN_PVA | = lv_in_pva | |
| IN_VKORG | = lv_in_vkorg | |
| IN_VTWEG | = lv_in_vtweg | |
| IMPORTING | ||
| OUT_VBELN | = lv_out_vbeln | |
| OUT_POSNR | = lv_out_posnr | |
| TABLES | ||
| RETURN | = lt_return | |
| EXCEPTIONS | ||
| PUBLICATION_NOT_FOUND = 1 | ||
| UNLOADING_POINT_NOT_FOUND = 2 | ||
| BUSINESS_PARTNER_NOT_FOUND = 3 | ||
| ATTRIBUTES_ERROR = 4 | ||
| CONTRACT_ERROR = 5 | ||
| . " ISM_2SD_CONTRACT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM ISM_2SD_CONTRACT_CREATE
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.Search for further information about these or an SAP related objects