SAP CFX_S_API_WRITE Function Module for Single API to create or change objects in cFolders
CFX_S_API_WRITE is a standard cfx s api write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Single API to create or change objects in cFolders 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 cfx s api write FM, simply by entering the name CFX_S_API_WRITE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CFX_S_API_DOC
Program Name: SAPLCFX_S_API_DOC
Main Program: SAPLCFX_S_API_DOC
Appliation area:
Release date: 15-Oct-2007
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CFX_S_API_WRITE 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 'CFX_S_API_WRITE'"Single API to create or change objects in cFolders.
IMPORTING
ET_FAULT = "Table that has all the fault during the single api call.
E_ERROR = "Boolean Type
CHANGING
CT_BOM = "Single API BOM table.
CT_MATERIAL = "Single API Material table
CT_GENERIC = "Single API Generic Object table
CT_DOCUMENT = "Single API document table
CT_IDS = "Single API: Table of GUIDs and name
EXPORTING Parameters details for CFX_S_API_WRITE
ET_FAULT - Table that has all the fault during the single api call.
Data type: CFX_S_API_TT_FAULTOptional: No
Call by Reference: No ( called with pass by value option)
E_ERROR - Boolean Type
Data type: CFX_API_T_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for CFX_S_API_WRITE
CT_BOM - Single API BOM table.
Data type: CFX_S_API_TT_BOMOptional: No
Call by Reference: No ( called with pass by value option)
CT_MATERIAL - Single API Material table
Data type: CFX_S_API_TT_MATOptional: No
Call by Reference: No ( called with pass by value option)
CT_GENERIC - Single API Generic Object table
Data type: CFX_S_API_TT_GENERICOptional: No
Call by Reference: No ( called with pass by value option)
CT_DOCUMENT - Single API document table
Data type: CFX_S_API_TT_DOCUMENTOptional: No
Call by Reference: No ( called with pass by value option)
CT_IDS - Single API: Table of GUIDs and name
Data type: CFX_S_API_TT_IDSOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CFX_S_API_WRITE 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_ct_bom | TYPE CFX_S_API_TT_BOM, " | |||
| lv_et_fault | TYPE CFX_S_API_TT_FAULT, " | |||
| lv_e_error | TYPE CFX_API_T_BOOL, " | |||
| lv_ct_material | TYPE CFX_S_API_TT_MAT, " | |||
| lv_ct_generic | TYPE CFX_S_API_TT_GENERIC, " | |||
| lv_ct_document | TYPE CFX_S_API_TT_DOCUMENT, " | |||
| lv_ct_ids | TYPE CFX_S_API_TT_IDS. " |
|   CALL FUNCTION 'CFX_S_API_WRITE' "Single API to create or change objects in cFolders |
| IMPORTING | ||
| ET_FAULT | = lv_et_fault | |
| E_ERROR | = lv_e_error | |
| CHANGING | ||
| CT_BOM | = lv_ct_bom | |
| CT_MATERIAL | = lv_ct_material | |
| CT_GENERIC | = lv_ct_generic | |
| CT_DOCUMENT | = lv_ct_document | |
| CT_IDS | = lv_ct_ids | |
| . " CFX_S_API_WRITE | ||
ABAP code using 7.40 inline data declarations to call FM CFX_S_API_WRITE
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.Search for further information about these or an SAP related objects