SAP Function Modules

DD_INSERT_BATCH_REQUEST SAP Function module







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

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


Pattern for FM DD_INSERT_BATCH_REQUEST - DD INSERT BATCH REQUEST





CALL FUNCTION 'DD_INSERT_BATCH_REQUEST' "
  EXPORTING
    function =                  " tbatg-fct     MDF, DEL, CNB, CNV, CRE, CMP, REP
*   id_name = SPACE             " dd12l-indexname  for INDX, MCID
*   modeflag = SPACE            " ddxtt-modeflag  'I' in case of inactive nametab, otherwise space
    obj_name =                  " tbatg-tabname  Object name
    obj_type =                  " tbatg-object  TABL, INDX, MCOB, MCID, VIEW, SQLT
    user =                      " tbatg-guser   Sold-to party of the background processing request
  IMPORTING
    subrc =                     " sy-subrc
  EXCEPTIONS
    DELETE_FAILED = 1           "               existing entries are not deleted
    FUNCTION_NOT_SUPPORTED = 2  "               function is not supported
    INSERT_FAILED = 3           "               Entry is not written
    OBJECT_TYPE_NOT_SUPPORTED = 4  "            Object type is not supported
    .  "  DD_INSERT_BATCH_REQUEST

ABAP code example for Function Module DD_INSERT_BATCH_REQUEST





The ABAP code below is a full code listing to execute function module DD_INSERT_BATCH_REQUEST 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_subrc  TYPE SY-SUBRC .


SELECT single FCT
FROM TBATG
INTO @DATA(ld_function).


SELECT single INDEXNAME
FROM DD12L
INTO @DATA(ld_id_name).


SELECT single MODEFLAG
FROM DDXTT
INTO @DATA(ld_modeflag).


SELECT single TABNAME
FROM TBATG
INTO @DATA(ld_obj_name).


SELECT single OBJECT
FROM TBATG
INTO @DATA(ld_obj_type).


SELECT single GUSER
FROM TBATG
INTO @DATA(ld_user).
. CALL FUNCTION 'DD_INSERT_BATCH_REQUEST' EXPORTING function = ld_function * id_name = ld_id_name * modeflag = ld_modeflag obj_name = ld_obj_name obj_type = ld_obj_type user = ld_user IMPORTING subrc = ld_subrc EXCEPTIONS DELETE_FAILED = 1 FUNCTION_NOT_SUPPORTED = 2 INSERT_FAILED = 3 OBJECT_TYPE_NOT_SUPPORTED = 4 . " DD_INSERT_BATCH_REQUEST
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 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_subrc  TYPE SY-SUBRC ,
ld_function  TYPE TBATG-FCT ,
ld_id_name  TYPE DD12L-INDEXNAME ,
ld_modeflag  TYPE DDXTT-MODEFLAG ,
ld_obj_name  TYPE TBATG-TABNAME ,
ld_obj_type  TYPE TBATG-OBJECT ,
ld_user  TYPE TBATG-GUSER .


SELECT single FCT
FROM TBATG
INTO ld_function.


SELECT single INDEXNAME
FROM DD12L
INTO ld_id_name.


SELECT single MODEFLAG
FROM DDXTT
INTO ld_modeflag.


SELECT single TABNAME
FROM TBATG
INTO ld_obj_name.


SELECT single OBJECT
FROM TBATG
INTO ld_obj_type.


SELECT single GUSER
FROM TBATG
INTO ld_user.

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