SAP BAPI_BUS1240_DELETE Function Module for
BAPI_BUS1240_DELETE is a standard bapi bus1240 delete SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 bapi bus1240 delete FM, simply by entering the name BAPI_BUS1240_DELETE into the relevant SAP transaction such as SE37 or SE38.
Function Group: 1240
Program Name: SAPL1240
Main Program: SAPL1240
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BUS1240_DELETE 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 'BAPI_BUS1240_DELETE'".
EXPORTING
* KEY_DATE = SY-DATUM "Validity Date
* FLG_INVPERS = "Delete Persons Involved
* FLG_INVPERS_LONGTEXT = "Delete Person Affected Long Text
* FLG_AFFPERS = "Delete Data of Persons Affected
* FLG_AFF_INTERN_LONGTEXT = "Delete Internal Note
* FLG_AFF_EXTERN_LONGTEXT = "Delete External Note
* FLG_INJURIES = "Delete Injuries of Persons Affected
* FLG_IA_VAL = "Delete Classification System Value Assignments Incident/Accident Log
* FLG_IP_VAL = "Delete Classification System Value Assignments Person Affected
* FLG_ACTION_LONGTEXT = "Delete Long Text for Safety Measures
* FLG_FREETEXT = "Delete User-Defined Texts and Documents
* CHANGE_NUMBER = "Change Number
* FLG_FREETEXT_LONGTEXT = "Delete Long Texts for User-Defined Texts and Documents
* FLG_ROOTCAUSE = "Delete Root Causes
* FLG_ABSENCES = "Delete Absences
* FLG_RESTRICTIONS = "Delete Multiple Restrictions
* FLG_RESTRICTIONS_OH = "
* VALFR = "Lower Time Interval Limit
* VALTO = "Upper Time Interval Limit
* FLG_TESTRUN = "Simulate only
* FLG_BUFFER = "Buffer data
* FLG_HEADER = "Delete Incident/Accident Log Header
* FLG_RESULT_LONGTEXT = "Delete Investigation Result
* FLG_ACTION = "Delete Industrial Hygiene and Safety Measures
IMPORTING
FLG_ABORT_ON_ERROR = "Cancel Processing
TABLES
RETURN = "Error Messages
* INJURIES = "Injuries to persons affected
* IAVA_DATA = "Value assignment instances for incident/accident log header
* IAPROP_DATA = "Value Assignment Data (Characteristic Value Assignments) for Inc./Acc. Log
* IPVA_DATA = "Value assignment instances for person affected
* IPPROP_DATA = "Value Assignment Data (Characteristic Value Assignments) for Person Affected
* ACTION_LONGTEXT = "Long Text for Safety Measures
* FREETEXT = "User-Defined Texts and Documents
* FREETEXT_LONGTEXT = "Long texts for user-defined texts and documents
* ROOTCAUSE = "Accident Causes (Root Cause)
* ABSENCES = "Absences of Persons Affected
HEADER = "Incident/accident log header data
* RESTRICTIONS = "Multiple Restrictions of Person Affected
* EXTENSION_IN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSION_OUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* RESULT_LONGTEXT = "Long Text for Result
* ACTION = "Industrial Hygiene and Safety Measures
* INVPERSONS = "Persons Involved
* INVPERS_LONGTEXT = "Long Text for Persons Involved (Accident Details)
* AFFPERSDAT = "Event data for persons affected
* AFF_INTLONGTEXT = "Long Text for Internal Note for Person Affected
* AFF_EXTLONGTEXT = "Long Text for External Note for Person Affected
IMPORTING Parameters details for BAPI_BUS1240_DELETE
KEY_DATE - Validity Date
Data type: RCGADDINF-VALDATDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_INVPERS - Delete Persons Involved
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_INVPERS_LONGTEXT - Delete Person Affected Long Text
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_AFFPERS - Delete Data of Persons Affected
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_AFF_INTERN_LONGTEXT - Delete Internal Note
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_AFF_EXTERN_LONGTEXT - Delete External Note
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_INJURIES - Delete Injuries of Persons Affected
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_IA_VAL - Delete Classification System Value Assignments Incident/Accident Log
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_IP_VAL - Delete Classification System Value Assignments Person Affected
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_ACTION_LONGTEXT - Delete Long Text for Safety Measures
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_FREETEXT - Delete User-Defined Texts and Documents
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGE_NUMBER - Change Number
Data type: RCGADDINF-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_FREETEXT_LONGTEXT - Delete Long Texts for User-Defined Texts and Documents
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_ROOTCAUSE - Delete Root Causes
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_ABSENCES - Delete Absences
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_RESTRICTIONS - Delete Multiple Restrictions
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_RESTRICTIONS_OH -
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
VALFR - Lower Time Interval Limit
Data type: RCGADDINF-VALDATOptional: Yes
Call by Reference: No ( called with pass by value option)
VALTO - Upper Time Interval Limit
Data type: RCGADDINF-VALDATOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_TESTRUN - Simulate only
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_BUFFER - Buffer data
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_HEADER - Delete Incident/Accident Log Header
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_RESULT_LONGTEXT - Delete Investigation Result
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_ACTION - Delete Industrial Hygiene and Safety Measures
Data type: BAPISTDTYP-BOOLEANOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_BUS1240_DELETE
FLG_ABORT_ON_ERROR - Cancel Processing
Data type: BAPISTDTYP-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BUS1240_DELETE
RETURN - Error Messages
Data type: BAPIRET2Optional: No
Call by Reference: Yes
INJURIES - Injuries to persons affected
Data type: BAPI1240_IPEVINJOptional: Yes
Call by Reference: Yes
IAVA_DATA - Value assignment instances for incident/accident log header
Data type: BAPI1240_IHVALOptional: Yes
Call by Reference: Yes
IAPROP_DATA - Value Assignment Data (Characteristic Value Assignments) for Inc./Acc. Log
Data type: BAPI1240_IHPROptional: Yes
Call by Reference: Yes
IPVA_DATA - Value assignment instances for person affected
Data type: BAPI1240_IHVALOptional: Yes
Call by Reference: Yes
IPPROP_DATA - Value Assignment Data (Characteristic Value Assignments) for Person Affected
Data type: BAPI1240_IHPROptional: Yes
Call by Reference: Yes
ACTION_LONGTEXT - Long Text for Safety Measures
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
FREETEXT - User-Defined Texts and Documents
Data type: BAPI1240_DFTOptional: Yes
Call by Reference: Yes
FREETEXT_LONGTEXT - Long texts for user-defined texts and documents
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
ROOTCAUSE - Accident Causes (Root Cause)
Data type: BAPI1240_RCOptional: Yes
Call by Reference: Yes
ABSENCES - Absences of Persons Affected
Data type: BAPI1240_IPABSSOptional: Yes
Call by Reference: Yes
HEADER - Incident/accident log header data
Data type: BAPI1240_IALHOptional: No
Call by Reference: Yes
RESTRICTIONS - Multiple Restrictions of Person Affected
Data type: BAPI1240_IPEVALIMOptional: Yes
Call by Reference: Yes
EXTENSION_IN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
EXTENSION_OUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RESULT_LONGTEXT - Long Text for Result
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
ACTION - Industrial Hygiene and Safety Measures
Data type: BAPI1240_ACHOptional: Yes
Call by Reference: Yes
INVPERSONS - Persons Involved
Data type: BAPI1240_IPOptional: Yes
Call by Reference: Yes
INVPERS_LONGTEXT - Long Text for Persons Involved (Accident Details)
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
AFFPERSDAT - Event data for persons affected
Data type: BAPI1240_IPEVAOptional: Yes
Call by Reference: Yes
AFF_INTLONGTEXT - Long Text for Internal Note for Person Affected
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
AFF_EXTLONGTEXT - Long Text for External Note for Person Affected
Data type: BAPI1240_LTXTOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_BUS1240_DELETE 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_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_key_date | TYPE RCGADDINF-VALDAT, " SY-DATUM | |||
| lv_flg_abort_on_error | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_injuries | TYPE STANDARD TABLE OF BAPI1240_IPEVINJ, " | |||
| lv_flg_invpers | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_iava_data | TYPE STANDARD TABLE OF BAPI1240_IHVAL, " | |||
| lv_flg_invpers_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_affpers | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_iaprop_data | TYPE STANDARD TABLE OF BAPI1240_IHPR, " | |||
| lt_ipva_data | TYPE STANDARD TABLE OF BAPI1240_IHVAL, " | |||
| lv_flg_aff_intern_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_ipprop_data | TYPE STANDARD TABLE OF BAPI1240_IHPR, " | |||
| lv_flg_aff_extern_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_injuries | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_action_longtext | TYPE STANDARD TABLE OF BAPI1240_LTXT, " | |||
| lt_freetext | TYPE STANDARD TABLE OF BAPI1240_DFT, " | |||
| lv_flg_ia_val | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_ip_val | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_freetext_longtext | TYPE STANDARD TABLE OF BAPI1240_LTXT, " | |||
| lt_rootcause | TYPE STANDARD TABLE OF BAPI1240_RC, " | |||
| lv_flg_action_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_absences | TYPE STANDARD TABLE OF BAPI1240_IPABSS, " | |||
| lv_flg_freetext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_header | TYPE STANDARD TABLE OF BAPI1240_IALH, " | |||
| lv_change_number | TYPE RCGADDINF-AENNR, " | |||
| lt_restrictions | TYPE STANDARD TABLE OF BAPI1240_IPEVALIM, " | |||
| lv_flg_freetext_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_flg_rootcause | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_absences | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_extension_out | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_flg_restrictions | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_restrictions_oh | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_valfr | TYPE RCGADDINF-VALDAT, " | |||
| lt_result_longtext | TYPE STANDARD TABLE OF BAPI1240_LTXT, " | |||
| lv_valto | TYPE RCGADDINF-VALDAT, " | |||
| lt_action | TYPE STANDARD TABLE OF BAPI1240_ACH, " | |||
| lt_invpersons | TYPE STANDARD TABLE OF BAPI1240_IP, " | |||
| lv_flg_testrun | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_buffer | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_invpers_longtext | TYPE STANDARD TABLE OF BAPI1240_LTXT, " | |||
| lt_affpersdat | TYPE STANDARD TABLE OF BAPI1240_IPEVA, " | |||
| lv_flg_header | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_aff_intlongtext | TYPE STANDARD TABLE OF BAPI1240_LTXT, " | |||
| lv_flg_result_longtext | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lv_flg_action | TYPE BAPISTDTYP-BOOLEAN, " | |||
| lt_aff_extlongtext | TYPE STANDARD TABLE OF BAPI1240_LTXT. " |
|   CALL FUNCTION 'BAPI_BUS1240_DELETE' " |
| EXPORTING | ||
| KEY_DATE | = lv_key_date | |
| FLG_INVPERS | = lv_flg_invpers | |
| FLG_INVPERS_LONGTEXT | = lv_flg_invpers_longtext | |
| FLG_AFFPERS | = lv_flg_affpers | |
| FLG_AFF_INTERN_LONGTEXT | = lv_flg_aff_intern_longtext | |
| FLG_AFF_EXTERN_LONGTEXT | = lv_flg_aff_extern_longtext | |
| FLG_INJURIES | = lv_flg_injuries | |
| FLG_IA_VAL | = lv_flg_ia_val | |
| FLG_IP_VAL | = lv_flg_ip_val | |
| FLG_ACTION_LONGTEXT | = lv_flg_action_longtext | |
| FLG_FREETEXT | = lv_flg_freetext | |
| CHANGE_NUMBER | = lv_change_number | |
| FLG_FREETEXT_LONGTEXT | = lv_flg_freetext_longtext | |
| FLG_ROOTCAUSE | = lv_flg_rootcause | |
| FLG_ABSENCES | = lv_flg_absences | |
| FLG_RESTRICTIONS | = lv_flg_restrictions | |
| FLG_RESTRICTIONS_OH | = lv_flg_restrictions_oh | |
| VALFR | = lv_valfr | |
| VALTO | = lv_valto | |
| FLG_TESTRUN | = lv_flg_testrun | |
| FLG_BUFFER | = lv_flg_buffer | |
| FLG_HEADER | = lv_flg_header | |
| FLG_RESULT_LONGTEXT | = lv_flg_result_longtext | |
| FLG_ACTION | = lv_flg_action | |
| IMPORTING | ||
| FLG_ABORT_ON_ERROR | = lv_flg_abort_on_error | |
| TABLES | ||
| RETURN | = lt_return | |
| INJURIES | = lt_injuries | |
| IAVA_DATA | = lt_iava_data | |
| IAPROP_DATA | = lt_iaprop_data | |
| IPVA_DATA | = lt_ipva_data | |
| IPPROP_DATA | = lt_ipprop_data | |
| ACTION_LONGTEXT | = lt_action_longtext | |
| FREETEXT | = lt_freetext | |
| FREETEXT_LONGTEXT | = lt_freetext_longtext | |
| ROOTCAUSE | = lt_rootcause | |
| ABSENCES | = lt_absences | |
| HEADER | = lt_header | |
| RESTRICTIONS | = lt_restrictions | |
| EXTENSION_IN | = lt_extension_in | |
| EXTENSION_OUT | = lt_extension_out | |
| RESULT_LONGTEXT | = lt_result_longtext | |
| ACTION | = lt_action | |
| INVPERSONS | = lt_invpersons | |
| INVPERS_LONGTEXT | = lt_invpers_longtext | |
| AFFPERSDAT | = lt_affpersdat | |
| AFF_INTLONGTEXT | = lt_aff_intlongtext | |
| AFF_EXTLONGTEXT | = lt_aff_extlongtext | |
| . " BAPI_BUS1240_DELETE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BUS1240_DELETE
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 VALDAT FROM RCGADDINF INTO @DATA(ld_key_date). | ||||
| DATA(ld_key_date) | = SY-DATUM. | |||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_abort_on_error). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_invpers). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_invpers_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_affpers). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_aff_intern_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_aff_extern_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_injuries). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_ia_val). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_ip_val). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_action_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_freetext). | ||||
| "SELECT single AENNR FROM RCGADDINF INTO @DATA(ld_change_number). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_freetext_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_rootcause). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_absences). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_restrictions). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_restrictions_oh). | ||||
| "SELECT single VALDAT FROM RCGADDINF INTO @DATA(ld_valfr). | ||||
| "SELECT single VALDAT FROM RCGADDINF INTO @DATA(ld_valto). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_testrun). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_buffer). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_header). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_result_longtext). | ||||
| "SELECT single BOOLEAN FROM BAPISTDTYP INTO @DATA(ld_flg_action). | ||||
Search for further information about these or an SAP related objects