SAP BAPI_WARRANTYCLAIM_CREATE Function Module for Create Warranty Claim
BAPI_WARRANTYCLAIM_CREATE is a standard bapi warrantyclaim 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 Create Warranty Claim 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 bapi warrantyclaim create FM, simply by entering the name BAPI_WARRANTYCLAIM_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: WTY12
Program Name: SAPLWTY12
Main Program: SAPLWTY12
Appliation area:
Release date: 12-Dec-2008
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function BAPI_WARRANTYCLAIM_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 'BAPI_WARRANTYCLAIM_CREATE'"Create Warranty Claim.
EXPORTING
CLAIM_HEADER = "Warranty Claim Header Data
* SIMULATE = ' ' "Simulation Mode = 'X', No Claim Created
IMPORTING
CLAIM = "Number of Warranty Claim
CLAIM_TMP_IDENT = "GUID in 'CHAR' Format in Uppercase
TABLES
* CLAIM_VERSION = "Warranty Claim Version
* CLAIM_PARTNER = "Partner for Warranty Claim
* CLAIM_ITEM = "Warranty Claim Item
* CLAIM_TEXT = "Long Texts for Warranty Claim
* CLAIM_MEASURE = "Warranty: Measurement Data for Object and Claim
* CLAIM_PRICING = "Prices Belonging to Warranty Claim
* VERSION_REL = "Warranty Claim: Relationship Between Versions
* ITEM_REL = "Warranty Claim: Relationship Between Items
RETURN2 = "Return Parameters
* EXTENSIONIN = "Customer Enhancment Import
IMPORTING Parameters details for BAPI_WARRANTYCLAIM_CREATE
CLAIM_HEADER - Warranty Claim Header Data
Data type: BAPI2222HEADEROptional: No
Call by Reference: No ( called with pass by value option)
SIMULATE - Simulation Mode = 'X', No Claim Created
Data type: BAPI2222HEADER-SIMULATIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_WARRANTYCLAIM_CREATE
CLAIM - Number of Warranty Claim
Data type: BAPI2222HEADER-CLAIMOptional: No
Call by Reference: No ( called with pass by value option)
CLAIM_TMP_IDENT - GUID in 'CHAR' Format in Uppercase
Data type: BAPI2222HEADER-CLAIM_TMP_IDENTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_WARRANTYCLAIM_CREATE
CLAIM_VERSION - Warranty Claim Version
Data type: BAPI2222VERSIONOptional: Yes
Call by Reference: Yes
CLAIM_PARTNER - Partner for Warranty Claim
Data type: BAPI2222PARTNEROptional: Yes
Call by Reference: Yes
CLAIM_ITEM - Warranty Claim Item
Data type: BAPI2222ITEMOptional: Yes
Call by Reference: Yes
CLAIM_TEXT - Long Texts for Warranty Claim
Data type: BAPI2222LONGTEXTOptional: Yes
Call by Reference: Yes
CLAIM_MEASURE - Warranty: Measurement Data for Object and Claim
Data type: BAPI2222MEASUREOptional: Yes
Call by Reference: Yes
CLAIM_PRICING - Prices Belonging to Warranty Claim
Data type: BAPI2222PRICINGOptional: Yes
Call by Reference: Yes
VERSION_REL - Warranty Claim: Relationship Between Versions
Data type: BAPI2222VERSIONRELATIONOptional: Yes
Call by Reference: Yes
ITEM_REL - Warranty Claim: Relationship Between Items
Data type: BAPI2222ITEMRELATIONOptional: Yes
Call by Reference: Yes
RETURN2 - Return Parameters
Data type: BAPIRET2Optional: No
Call by Reference: Yes
EXTENSIONIN - Customer Enhancment Import
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_WARRANTYCLAIM_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_claim | TYPE BAPI2222HEADER-CLAIM, " | |||
lv_claim_header | TYPE BAPI2222HEADER, " | |||
lt_claim_version | TYPE STANDARD TABLE OF BAPI2222VERSION, " | |||
lt_claim_partner | TYPE STANDARD TABLE OF BAPI2222PARTNER, " | |||
lv_simulate | TYPE BAPI2222HEADER-SIMULATION, " SPACE | |||
lt_claim_item | TYPE STANDARD TABLE OF BAPI2222ITEM, " | |||
lv_claim_tmp_ident | TYPE BAPI2222HEADER-CLAIM_TMP_IDENT, " | |||
lt_claim_text | TYPE STANDARD TABLE OF BAPI2222LONGTEXT, " | |||
lt_claim_measure | TYPE STANDARD TABLE OF BAPI2222MEASURE, " | |||
lt_claim_pricing | TYPE STANDARD TABLE OF BAPI2222PRICING, " | |||
lt_version_rel | TYPE STANDARD TABLE OF BAPI2222VERSIONRELATION, " | |||
lt_item_rel | TYPE STANDARD TABLE OF BAPI2222ITEMRELATION, " | |||
lt_return2 | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX. " |
  CALL FUNCTION 'BAPI_WARRANTYCLAIM_CREATE' "Create Warranty Claim |
EXPORTING | ||
CLAIM_HEADER | = lv_claim_header | |
SIMULATE | = lv_simulate | |
IMPORTING | ||
CLAIM | = lv_claim | |
CLAIM_TMP_IDENT | = lv_claim_tmp_ident | |
TABLES | ||
CLAIM_VERSION | = lt_claim_version | |
CLAIM_PARTNER | = lt_claim_partner | |
CLAIM_ITEM | = lt_claim_item | |
CLAIM_TEXT | = lt_claim_text | |
CLAIM_MEASURE | = lt_claim_measure | |
CLAIM_PRICING | = lt_claim_pricing | |
VERSION_REL | = lt_version_rel | |
ITEM_REL | = lt_item_rel | |
RETURN2 | = lt_return2 | |
EXTENSIONIN | = lt_extensionin | |
. " BAPI_WARRANTYCLAIM_CREATE |
ABAP code using 7.40 inline data declarations to call FM BAPI_WARRANTYCLAIM_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."SELECT single CLAIM FROM BAPI2222HEADER INTO @DATA(ld_claim). | ||||
"SELECT single SIMULATION FROM BAPI2222HEADER INTO @DATA(ld_simulate). | ||||
DATA(ld_simulate) | = ' '. | |||
"SELECT single CLAIM_TMP_IDENT FROM BAPI2222HEADER INTO @DATA(ld_claim_tmp_ident). | ||||
Search for further information about these or an SAP related objects