SAP 1240_COPY_BAPIPAREX_2_APITAB Function Module for
1240_COPY_BAPIPAREX_2_APITAB is a standard 1240 copy bapiparex 2 apitab 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 1240 copy bapiparex 2 apitab FM, simply by entering the name 1240_COPY_BAPIPAREX_2_APITAB 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): Normal Function Module
Update:
Function 1240_COPY_BAPIPAREX_2_APITAB 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 '1240_COPY_BAPIPAREX_2_APITAB'".
EXPORTING
I_EXTENSION_TAB = "BAPI Extension
CHANGING
* X_API_HEADER_TAB = "EHS: Table Type CCIHS_IALHAPI (Inc./Acc. Log Header API)
* X_API_ACTION_TAB = "EHS: Table Type CCIHS_ACHAPI (Safety Measures API)
* X_API_INVPERSONS_TAB = "EHS: Table Type Person Involved - API (CCIHS_IPAPI)
* X_API_AFFPERSDAT_TAB = "EHS: Table Type for CCIHY_IPEVAAPI - Event Data for Person
* X_API_INJURIES_TAB = "EHS: Table Type for CCIHS_IPEVINJAPI (Injuries)
* X_API_ROOTCAUSE_TAB = "EHS: Table Type CCIHS_RCAPI
* X_API_ABSENCES_TAB = "EHS: Table Type for CCIHS_IPABSSAPI
* X_API_RESTRICTIONS_TAB = "EHS: Table Type for Structure CCIHS_IPEVALIMAPI
* X_RESTRICTIONS_OH_TAB = "EHS: Table Type for Structure CCIHS_LIM_OH
IMPORTING Parameters details for 1240_COPY_BAPIPAREX_2_APITAB
I_EXTENSION_TAB - BAPI Extension
Data type: BAPIPAREX_TOptional: No
Call by Reference: Yes
CHANGING Parameters details for 1240_COPY_BAPIPAREX_2_APITAB
X_API_HEADER_TAB - EHS: Table Type CCIHS_IALHAPI (Inc./Acc. Log Header API)
Data type: CCIHY_IALHAPIOptional: Yes
Call by Reference: Yes
X_API_ACTION_TAB - EHS: Table Type CCIHS_ACHAPI (Safety Measures API)
Data type: CCIHY_ACHAPIOptional: Yes
Call by Reference: Yes
X_API_INVPERSONS_TAB - EHS: Table Type Person Involved - API (CCIHS_IPAPI)
Data type: CCIHY_IPAPIOptional: Yes
Call by Reference: Yes
X_API_AFFPERSDAT_TAB - EHS: Table Type for CCIHY_IPEVAAPI - Event Data for Person
Data type: CCIHY_IPEVAAPIOptional: Yes
Call by Reference: Yes
X_API_INJURIES_TAB - EHS: Table Type for CCIHS_IPEVINJAPI (Injuries)
Data type: CCIHY_IPEVINJAPIOptional: Yes
Call by Reference: Yes
X_API_ROOTCAUSE_TAB - EHS: Table Type CCIHS_RCAPI
Data type: CCIHY_RCAPIOptional: Yes
Call by Reference: Yes
X_API_ABSENCES_TAB - EHS: Table Type for CCIHS_IPABSSAPI
Data type: CCIHY_IPABSSAPIOptional: Yes
Call by Reference: Yes
X_API_RESTRICTIONS_TAB - EHS: Table Type for Structure CCIHS_IPEVALIMAPI
Data type: CCIHY_IPEVALIMAPIOptional: Yes
Call by Reference: Yes
X_RESTRICTIONS_OH_TAB - EHS: Table Type for Structure CCIHS_LIM_OH
Data type: CCIHY_LIM_OHOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for 1240_COPY_BAPIPAREX_2_APITAB 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_i_extension_tab | TYPE BAPIPAREX_T, " | |||
lv_x_api_header_tab | TYPE CCIHY_IALHAPI, " | |||
lv_x_api_action_tab | TYPE CCIHY_ACHAPI, " | |||
lv_x_api_invpersons_tab | TYPE CCIHY_IPAPI, " | |||
lv_x_api_affpersdat_tab | TYPE CCIHY_IPEVAAPI, " | |||
lv_x_api_injuries_tab | TYPE CCIHY_IPEVINJAPI, " | |||
lv_x_api_rootcause_tab | TYPE CCIHY_RCAPI, " | |||
lv_x_api_absences_tab | TYPE CCIHY_IPABSSAPI, " | |||
lv_x_api_restrictions_tab | TYPE CCIHY_IPEVALIMAPI, " | |||
lv_x_restrictions_oh_tab | TYPE CCIHY_LIM_OH. " |
  CALL FUNCTION '1240_COPY_BAPIPAREX_2_APITAB' " |
EXPORTING | ||
I_EXTENSION_TAB | = lv_i_extension_tab | |
CHANGING | ||
X_API_HEADER_TAB | = lv_x_api_header_tab | |
X_API_ACTION_TAB | = lv_x_api_action_tab | |
X_API_INVPERSONS_TAB | = lv_x_api_invpersons_tab | |
X_API_AFFPERSDAT_TAB | = lv_x_api_affpersdat_tab | |
X_API_INJURIES_TAB | = lv_x_api_injuries_tab | |
X_API_ROOTCAUSE_TAB | = lv_x_api_rootcause_tab | |
X_API_ABSENCES_TAB | = lv_x_api_absences_tab | |
X_API_RESTRICTIONS_TAB | = lv_x_api_restrictions_tab | |
X_RESTRICTIONS_OH_TAB | = lv_x_restrictions_oh_tab | |
. " 1240_COPY_BAPIPAREX_2_APITAB |
ABAP code using 7.40 inline data declarations to call FM 1240_COPY_BAPIPAREX_2_APITAB
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