SAP AP_SCE_INIT Function Module for AP: Initial
AP_SCE_INIT is a standard ap sce init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for AP: Initial 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 ap sce init FM, simply by entering the name AP_SCE_INIT into the relevant SAP transaction such as SE37 or SE38.
Function Group: AP_CFG_DB_TRANS_CLASSIC
Program Name: SAPLAP_CFG_DB_TRANS_CLASSIC
Main Program: SAPLAP_CFG_DB_TRANS_CLASSIC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function AP_SCE_INIT 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 'AP_SCE_INIT'"AP: Initial.
EXPORTING
DOWNLOAD_HEADER = "BAPI Structure for Downloading Header Data
OBJECT_CLASS = "Object Class
OBJECT_NAME = "Object Name for Download
TABLES
T_INTERNAL_TABLES = "Middleware Transaction Container Structure
BAPISTRUCTURES = "Middleware Transaction Container Structure
MESSAGES = "BAPI Structure: Messages per Data Record
KEY_INFO = "BAPI Structure: Key Information
T_OTHER_INFO = "Container for 'Customer Exit' Parameter
T_BAPISTRUCTURES_OLD = "Middleware Transaction Container Structure
TI_INIT_FILTER = "Dynamic Selection Parameters
TI_IDLIST = "Key Values
IMPORTING Parameters details for AP_SCE_INIT
DOWNLOAD_HEADER - BAPI Structure for Downloading Header Data
Data type: BAPICRMDH2Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_CLASS - Object Class
Data type: BAPICRMOBJ-OBJCLASSOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NAME - Object Name for Download
Data type: BAPICRMOBJ-OBJ_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for AP_SCE_INIT
T_INTERNAL_TABLES - Middleware Transaction Container Structure
Data type: BAPIMTCSOptional: No
Call by Reference: No ( called with pass by value option)
BAPISTRUCTURES - Middleware Transaction Container Structure
Data type: BAPIMTCSOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGES - BAPI Structure: Messages per Data Record
Data type: BAPICRMMSGOptional: No
Call by Reference: No ( called with pass by value option)
KEY_INFO - BAPI Structure: Key Information
Data type: BAPICRMKEYOptional: No
Call by Reference: No ( called with pass by value option)
T_OTHER_INFO - Container for 'Customer Exit' Parameter
Data type: BAPICRMEXTOptional: No
Call by Reference: No ( called with pass by value option)
T_BAPISTRUCTURES_OLD - Middleware Transaction Container Structure
Data type: BAPIMTCSOptional: No
Call by Reference: No ( called with pass by value option)
TI_INIT_FILTER - Dynamic Selection Parameters
Data type: CRMSELSTROptional: No
Call by Reference: No ( called with pass by value option)
TI_IDLIST - Key Values
Data type: BAPIIDLISTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for AP_SCE_INIT 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_download_header | TYPE BAPICRMDH2, " | |||
| lt_t_internal_tables | TYPE STANDARD TABLE OF BAPIMTCS, " | |||
| lv_object_class | TYPE BAPICRMOBJ-OBJCLASS, " | |||
| lt_bapistructures | TYPE STANDARD TABLE OF BAPIMTCS, " | |||
| lt_messages | TYPE STANDARD TABLE OF BAPICRMMSG, " | |||
| lv_object_name | TYPE BAPICRMOBJ-OBJ_NAME, " | |||
| lt_key_info | TYPE STANDARD TABLE OF BAPICRMKEY, " | |||
| lt_t_other_info | TYPE STANDARD TABLE OF BAPICRMEXT, " | |||
| lt_t_bapistructures_old | TYPE STANDARD TABLE OF BAPIMTCS, " | |||
| lt_ti_init_filter | TYPE STANDARD TABLE OF CRMSELSTR, " | |||
| lt_ti_idlist | TYPE STANDARD TABLE OF BAPIIDLIST. " |
|   CALL FUNCTION 'AP_SCE_INIT' "AP: Initial |
| EXPORTING | ||
| DOWNLOAD_HEADER | = lv_download_header | |
| OBJECT_CLASS | = lv_object_class | |
| OBJECT_NAME | = lv_object_name | |
| TABLES | ||
| T_INTERNAL_TABLES | = lt_t_internal_tables | |
| BAPISTRUCTURES | = lt_bapistructures | |
| MESSAGES | = lt_messages | |
| KEY_INFO | = lt_key_info | |
| T_OTHER_INFO | = lt_t_other_info | |
| T_BAPISTRUCTURES_OLD | = lt_t_bapistructures_old | |
| TI_INIT_FILTER | = lt_ti_init_filter | |
| TI_IDLIST | = lt_ti_idlist | |
| . " AP_SCE_INIT | ||
ABAP code using 7.40 inline data declarations to call FM AP_SCE_INIT
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 OBJCLASS FROM BAPICRMOBJ INTO @DATA(ld_object_class). | ||||
| "SELECT single OBJ_NAME FROM BAPICRMOBJ INTO @DATA(ld_object_name). | ||||
Search for further information about these or an SAP related objects