SAP Function Modules

ISU_S_CONTRACT_CREATE SAP Function module - INTERNAL: Create a Contract







ISU_S_CONTRACT_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ISU_S_CONTRACT_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ES20
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ISU_S_CONTRACT_CREATE - ISU S CONTRACT CREATE





CALL FUNCTION 'ISU_S_CONTRACT_CREATE' "INTERNAL: Create a Contract
  EXPORTING
*   x_vertrag =                 " ever-vertrag  Contract Number
    x_sparte =                  " ever-sparte   Division
    x_bukrs =                   " ever-bukrs    Company Code
*   x_upd_online =              " regen-upd_online  Indicator: Update Online
*   x_no_dialog =               " regen-no_dialog  Indicator: no dialog
*   x_auto =                    " isu01_contract_auto  Automation data
  IMPORTING
    y_db_update =               " regen-db_update  Indicator: Database Change
    y_exit_type =               " regen-exit_type  Return Mode
    y_new_ever =                " ever
  EXCEPTIONS
    NOT_FOUND = 1               "               Contract does not exist
    EXISTING = 2                "
    FOREIGN_LOCK = 3            "
    NUMBER_ERROR = 4            "               Error in number assignment
    SYSTEM_ERROR = 5            "               General system error
    NOT_QUALIFIED = 6           "
    INPUT_ERROR = 7             "
    .  "  ISU_S_CONTRACT_CREATE

ABAP code example for Function Module ISU_S_CONTRACT_CREATE





The ABAP code below is a full code listing to execute function module ISU_S_CONTRACT_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_y_db_update  TYPE REGEN-DB_UPDATE ,
ld_y_exit_type  TYPE REGEN-EXIT_TYPE ,
ld_y_new_ever  TYPE EVER .


SELECT single VERTRAG
FROM EVER
INTO @DATA(ld_x_vertrag).


SELECT single SPARTE
FROM EVER
INTO @DATA(ld_x_sparte).


SELECT single BUKRS
FROM EVER
INTO @DATA(ld_x_bukrs).


DATA(ld_x_upd_online) = some text here

DATA(ld_x_no_dialog) = some text here
DATA(ld_x_auto) = 'Check type of data required'. . CALL FUNCTION 'ISU_S_CONTRACT_CREATE' EXPORTING * x_vertrag = ld_x_vertrag x_sparte = ld_x_sparte x_bukrs = ld_x_bukrs * x_upd_online = ld_x_upd_online * x_no_dialog = ld_x_no_dialog * x_auto = ld_x_auto IMPORTING y_db_update = ld_y_db_update y_exit_type = ld_y_exit_type y_new_ever = ld_y_new_ever EXCEPTIONS NOT_FOUND = 1 EXISTING = 2 FOREIGN_LOCK = 3 NUMBER_ERROR = 4 SYSTEM_ERROR = 5 NOT_QUALIFIED = 6 INPUT_ERROR = 7 . " ISU_S_CONTRACT_CREATE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_y_db_update  TYPE REGEN-DB_UPDATE ,
ld_x_vertrag  TYPE EVER-VERTRAG ,
ld_y_exit_type  TYPE REGEN-EXIT_TYPE ,
ld_x_sparte  TYPE EVER-SPARTE ,
ld_y_new_ever  TYPE EVER ,
ld_x_bukrs  TYPE EVER-BUKRS ,
ld_x_upd_online  TYPE REGEN-UPD_ONLINE ,
ld_x_no_dialog  TYPE REGEN-NO_DIALOG ,
ld_x_auto  TYPE ISU01_CONTRACT_AUTO .


SELECT single VERTRAG
FROM EVER
INTO ld_x_vertrag.


SELECT single SPARTE
FROM EVER
INTO ld_x_sparte.


SELECT single BUKRS
FROM EVER
INTO ld_x_bukrs.


ld_x_upd_online = some text here

ld_x_no_dialog = some text here
ld_x_auto = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ISU_S_CONTRACT_CREATE or its description.