SAP Function Modules

DX_RUNDEF_CREATE SAP Function module







DX_RUNDEF_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 DX_RUNDEF_CREATE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM DX_RUNDEF_CREATE - DX RUNDEF CREATE





CALL FUNCTION 'DX_RUNDEF_CREATE' "
  EXPORTING
    project =                   " dxrundef-project
    subproject =                " dxrundef-subproject
*   rundef =                    " dxrundef-rundef
*   text =                      " dxrundef_t-text
*   dialog = 'X'                " dxfields-dialog
*   no_db =                     " dxfields-checkbox  Checkbox: 'X' = True, ' ' = False
  IMPORTING
    rundefdata =                " dxrundef
    rundeftext =                " dxrundef_t-text
  EXCEPTIONS
    SUBPROJECT_DOES_NOT_EXIST = 1  "
    RUNDEF_ALREADY_EXISTS = 2   "
    CANCELED_BY_USER = 3        "
    DB_ERROR = 4                "
    NO_AUTHORITY = 5            "
    .  "  DX_RUNDEF_CREATE

ABAP code example for Function Module DX_RUNDEF_CREATE





The ABAP code below is a full code listing to execute function module DX_RUNDEF_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_rundefdata  TYPE DXRUNDEF ,
ld_rundeftext  TYPE DXRUNDEF_T-TEXT .


SELECT single PROJECT
FROM DXRUNDEF
INTO @DATA(ld_project).


SELECT single SUBPROJECT
FROM DXRUNDEF
INTO @DATA(ld_subproject).


SELECT single RUNDEF
FROM DXRUNDEF
INTO @DATA(ld_rundef).


SELECT single TEXT
FROM DXRUNDEF_T
INTO @DATA(ld_text).


DATA(ld_dialog) = some text here

DATA(ld_no_db) = some text here . CALL FUNCTION 'DX_RUNDEF_CREATE' EXPORTING project = ld_project subproject = ld_subproject * rundef = ld_rundef * text = ld_text * dialog = ld_dialog * no_db = ld_no_db IMPORTING rundefdata = ld_rundefdata rundeftext = ld_rundeftext EXCEPTIONS SUBPROJECT_DOES_NOT_EXIST = 1 RUNDEF_ALREADY_EXISTS = 2 CANCELED_BY_USER = 3 DB_ERROR = 4 NO_AUTHORITY = 5 . " DX_RUNDEF_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 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_rundefdata  TYPE DXRUNDEF ,
ld_project  TYPE DXRUNDEF-PROJECT ,
ld_rundeftext  TYPE DXRUNDEF_T-TEXT ,
ld_subproject  TYPE DXRUNDEF-SUBPROJECT ,
ld_rundef  TYPE DXRUNDEF-RUNDEF ,
ld_text  TYPE DXRUNDEF_T-TEXT ,
ld_dialog  TYPE DXFIELDS-DIALOG ,
ld_no_db  TYPE DXFIELDS-CHECKBOX .


SELECT single PROJECT
FROM DXRUNDEF
INTO ld_project.


SELECT single SUBPROJECT
FROM DXRUNDEF
INTO ld_subproject.


SELECT single RUNDEF
FROM DXRUNDEF
INTO ld_rundef.


SELECT single TEXT
FROM DXRUNDEF_T
INTO ld_text.


ld_dialog = some text here

ld_no_db = some text here

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 DX_RUNDEF_CREATE or its description.