SAP SO_INCIDENT_CREATE Function Module for Core Function Module for creating an Incident









SO_INCIDENT_CREATE is a standard so incident create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Core Function Module for creating an Incident 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 so incident create FM, simply by entering the name SO_INCIDENT_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function SO_INCIDENT_CREATE 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 'SO_INCIDENT_CREATE'"Core Function Module for creating an Incident
EXPORTING
IV_CATEGORY = "Incident Category
IT_PERSON_INVOLVED = "Person Involved Table
IS_BASIC_INFO = "Basic Information of an Incident
IT_INC_GROUP = "Incident Group Table
IT_NM_GROUP = "Near Miss Group Table
IT_SO_GROUP = "Safety Observation Group Table
IS_CIRCUMSTANCES = "Incident Circumstances
IS_ATTACHMENT = "Action parameter for create folder

IMPORTING
ET_RETURN = "Return Parameter
.



IMPORTING Parameters details for SO_INCIDENT_CREATE

IV_CATEGORY - Incident Category

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

IT_PERSON_INVOLVED - Person Involved Table

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

IS_BASIC_INFO - Basic Information of an Incident

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

IT_INC_GROUP - Incident Group Table

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

IT_NM_GROUP - Near Miss Group Table

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

IT_SO_GROUP - Safety Observation Group Table

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

IS_CIRCUMSTANCES - Incident Circumstances

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

IS_ATTACHMENT - Action parameter for create folder

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

EXPORTING Parameters details for SO_INCIDENT_CREATE

ET_RETURN - Return Parameter

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

Copy and paste ABAP code example for SO_INCIDENT_CREATE 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_et_return  TYPE BAPIRETTAB, "   
lv_iv_category  TYPE EHHSS_INC_CATEGORY_CODE, "   
lv_it_person_involved  TYPE STSO_INC_PER_INVOLVED, "   
lv_is_basic_info  TYPE SSSO_INC_BASIC_INFO_ALL, "   
lv_it_inc_group  TYPE STSO_INC_GROUP_CODE, "   
lv_it_nm_group  TYPE STSO_NM_GROUP_CODE, "   
lv_it_so_group  TYPE STSO_GROUP_CODE, "   
lv_is_circumstances  TYPE SSSO_INC_CIRCUMSTANCES, "   
lv_is_attachment  TYPE /BOBF/S_ATF_A_CREATE_FILE. "   

  CALL FUNCTION 'SO_INCIDENT_CREATE'  "Core Function Module for creating an Incident
    EXPORTING
         IV_CATEGORY = lv_iv_category
         IT_PERSON_INVOLVED = lv_it_person_involved
         IS_BASIC_INFO = lv_is_basic_info
         IT_INC_GROUP = lv_it_inc_group
         IT_NM_GROUP = lv_it_nm_group
         IT_SO_GROUP = lv_it_so_group
         IS_CIRCUMSTANCES = lv_is_circumstances
         IS_ATTACHMENT = lv_is_attachment
    IMPORTING
         ET_RETURN = lv_et_return
. " SO_INCIDENT_CREATE




ABAP code using 7.40 inline data declarations to call FM SO_INCIDENT_CREATE

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



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!