SAP DMC_GENERIC_WRITER_FLAT Function Module for generic writer module (write to one table only)
DMC_GENERIC_WRITER_FLAT is a standard dmc generic writer flat SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for generic writer module (write to one table only) 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 generic writer flat FM, simply by entering the name DMC_GENERIC_WRITER_FLAT into the relevant SAP transaction such as SE37 or SE38.
Function Group: DMC_GENERIC_READ_WRITE
Program Name: SAPLDMC_GENERIC_READ_WRITE
Main Program: SAPLDMC_GENERIC_READ_WRITE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function DMC_GENERIC_WRITER_FLAT 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_GENERIC_WRITER_FLAT'"generic writer module (write to one table only).
EXPORTING
* I_BEHAVIOUR = 1 "write behaviour
* I_TEST_MODE = "test mode
* I_IN_PROCESS = "in process
* I_ALL_CLIENTS = "write into all clients
I_TABNAME = "Table Name
* I_LOGGING_OFF = "deactivate DBTABLOG logging
* I_DB_CONNECTION = "Logical name for a database connection
TABLES
CT_PAYLOAD = "generic transfer structure for generic read / write
EXCEPTIONS
DUPLICATE_KEY_ERROR = 1 NO_AUTHORIZATION = 2 NO_SUMUP_POSSIBLE = 3 IMPORT_ERROR = 4
IMPORTING Parameters details for DMC_GENERIC_WRITER_FLAT
I_BEHAVIOUR - write behaviour
Data type: NUM1Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TEST_MODE - test mode
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
I_IN_PROCESS - in process
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ALL_CLIENTS - write into all clients
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TABNAME - Table Name
Data type: TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_LOGGING_OFF - deactivate DBTABLOG logging
Data type: BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DB_CONNECTION - Logical name for a database connection
Data type: DBCON_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for DMC_GENERIC_WRITER_FLAT
CT_PAYLOAD - generic transfer structure for generic read / write
Data type: DMC_GENERIC_TRANSFER_STRUCTOptional: No
Call by Reference: Yes
EXCEPTIONS details
DUPLICATE_KEY_ERROR - duplicate key error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORIZATION - no authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SUMUP_POSSIBLE - no sumup possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IMPORT_ERROR - import error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DMC_GENERIC_WRITER_FLAT 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_ct_payload | TYPE STANDARD TABLE OF DMC_GENERIC_TRANSFER_STRUCT, " | |||
lv_i_behaviour | TYPE NUM1, " 1 | |||
lv_duplicate_key_error | TYPE NUM1, " | |||
lv_i_test_mode | TYPE BOOLEAN, " | |||
lv_no_authorization | TYPE BOOLEAN, " | |||
lv_i_in_process | TYPE BOOLEAN, " | |||
lv_no_sumup_possible | TYPE BOOLEAN, " | |||
lv_import_error | TYPE BOOLEAN, " | |||
lv_i_all_clients | TYPE BOOLEAN, " | |||
lv_i_tabname | TYPE TABNAME, " | |||
lv_i_logging_off | TYPE BOOLEAN, " | |||
lv_i_db_connection | TYPE DBCON_NAME. " |
  CALL FUNCTION 'DMC_GENERIC_WRITER_FLAT' "generic writer module (write to one table only) |
EXPORTING | ||
I_BEHAVIOUR | = lv_i_behaviour | |
I_TEST_MODE | = lv_i_test_mode | |
I_IN_PROCESS | = lv_i_in_process | |
I_ALL_CLIENTS | = lv_i_all_clients | |
I_TABNAME | = lv_i_tabname | |
I_LOGGING_OFF | = lv_i_logging_off | |
I_DB_CONNECTION | = lv_i_db_connection | |
TABLES | ||
CT_PAYLOAD | = lt_ct_payload | |
EXCEPTIONS | ||
DUPLICATE_KEY_ERROR = 1 | ||
NO_AUTHORIZATION = 2 | ||
NO_SUMUP_POSSIBLE = 3 | ||
IMPORT_ERROR = 4 | ||
. " DMC_GENERIC_WRITER_FLAT |
ABAP code using 7.40 inline data declarations to call FM DMC_GENERIC_WRITER_FLAT
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.DATA(ld_i_behaviour) | = 1. | |||
Search for further information about these or an SAP related objects