SAP DMC_IU_EXECUTE_EXT_COMMAND Function Module for MWB-Upgrade: Externes Kommando anlegen und ausführen









DMC_IU_EXECUTE_EXT_COMMAND is a standard dmc iu execute ext command SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for MWB-Upgrade: Externes Kommando anlegen und ausführen 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 dmc iu execute ext command FM, simply by entering the name DMC_IU_EXECUTE_EXT_COMMAND into the relevant SAP transaction such as SE37 or SE38.

Function Group: CNV_MWB_IU
Program Name: SAPLCNV_MWB_IU
Main Program: SAPLCNV_MWB_IU
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function DMC_IU_EXECUTE_EXT_COMMAND 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 'DMC_IU_EXECUTE_EXT_COMMAND'"MWB-Upgrade: Externes Kommando anlegen und ausführen
EXPORTING
IM_NAME = "logical command name
IM_COMMAND = "Name des externen Programms (evtl. inkl. Zugriff
* IM_PARAMETERS = "Parameter des externen Programms (als eine Zeich
IM_OP_SYSTEM = "Operating System
* IM_EXEC_ADDPARAM = "Parameter des externen Programms (als eine Zeich

IMPORTING
EX_COMMAND = "Parameterdatei
EX_EXITCODE = "

TABLES
EX_IT_PROTOCOL = "Protokoll-Nachricht eines ext. Prog. an den Aufr

EXCEPTIONS
CREATE_COMMAND_ERROR = 1 EXECUTE_COMMAND_ERROR = 2
.



IMPORTING Parameters details for DMC_IU_EXECUTE_EXT_COMMAND

IM_NAME - logical command name

Data type: DMC_IU_DTYPE-SXPGLOGCMD
Optional: No
Call by Reference: No ( called with pass by value option)

IM_COMMAND - Name des externen Programms (evtl. inkl. Zugriff

Data type: DMC_IU_DTYPE-BTCXPGPGM
Optional: No
Call by Reference: No ( called with pass by value option)

IM_PARAMETERS - Parameter des externen Programms (als eine Zeich

Data type: DMC_IU_DTYPE-BTCXPGPAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_OP_SYSTEM - Operating System

Data type: DMC_IU_DTYPE-SYOPSYS
Optional: No
Call by Reference: No ( called with pass by value option)

IM_EXEC_ADDPARAM - Parameter des externen Programms (als eine Zeich

Data type: DMC_IU_DTYPE-EXEC_ADDPARAM
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DMC_IU_EXECUTE_EXT_COMMAND

EX_COMMAND - Parameterdatei

Data type: DMC_IU_EXT_COMMAND-OS_COM
Optional: No
Call by Reference: No ( called with pass by value option)

EX_EXITCODE -

Data type: EXTCMDEXEX-EXITCODE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for DMC_IU_EXECUTE_EXT_COMMAND

EX_IT_PROTOCOL - Protokoll-Nachricht eines ext. Prog. an den Aufr

Data type: BTCXPM
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CREATE_COMMAND_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXECUTE_COMMAND_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DMC_IU_EXECUTE_EXT_COMMAND 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_im_name  TYPE DMC_IU_DTYPE-SXPGLOGCMD, "   
lv_ex_command  TYPE DMC_IU_EXT_COMMAND-OS_COM, "   
lt_ex_it_protocol  TYPE STANDARD TABLE OF BTCXPM, "   
lv_create_command_error  TYPE BTCXPM, "   
lv_im_command  TYPE DMC_IU_DTYPE-BTCXPGPGM, "   
lv_ex_exitcode  TYPE EXTCMDEXEX-EXITCODE, "   
lv_execute_command_error  TYPE EXTCMDEXEX, "   
lv_im_parameters  TYPE DMC_IU_DTYPE-BTCXPGPAR, "   
lv_im_op_system  TYPE DMC_IU_DTYPE-SYOPSYS, "   
lv_im_exec_addparam  TYPE DMC_IU_DTYPE-EXEC_ADDPARAM. "   

  CALL FUNCTION 'DMC_IU_EXECUTE_EXT_COMMAND'  "MWB-Upgrade: Externes Kommando anlegen und ausführen
    EXPORTING
         IM_NAME = lv_im_name
         IM_COMMAND = lv_im_command
         IM_PARAMETERS = lv_im_parameters
         IM_OP_SYSTEM = lv_im_op_system
         IM_EXEC_ADDPARAM = lv_im_exec_addparam
    IMPORTING
         EX_COMMAND = lv_ex_command
         EX_EXITCODE = lv_ex_exitcode
    TABLES
         EX_IT_PROTOCOL = lt_ex_it_protocol
    EXCEPTIONS
        CREATE_COMMAND_ERROR = 1
        EXECUTE_COMMAND_ERROR = 2
. " DMC_IU_EXECUTE_EXT_COMMAND




ABAP code using 7.40 inline data declarations to call FM DMC_IU_EXECUTE_EXT_COMMAND

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 SXPGLOGCMD FROM DMC_IU_DTYPE INTO @DATA(ld_im_name).
 
"SELECT single OS_COM FROM DMC_IU_EXT_COMMAND INTO @DATA(ld_ex_command).
 
 
 
"SELECT single BTCXPGPGM FROM DMC_IU_DTYPE INTO @DATA(ld_im_command).
 
"SELECT single EXITCODE FROM EXTCMDEXEX INTO @DATA(ld_ex_exitcode).
 
 
"SELECT single BTCXPGPAR FROM DMC_IU_DTYPE INTO @DATA(ld_im_parameters).
 
"SELECT single SYOPSYS FROM DMC_IU_DTYPE INTO @DATA(ld_im_op_system).
 
"SELECT single EXEC_ADDPARAM FROM DMC_IU_DTYPE INTO @DATA(ld_im_exec_addparam).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!