SAP BAPI_INSPCHAR_SETRESULT Function Module for Confirm Inspection Results









BAPI_INSPCHAR_SETRESULT is a standard bapi inspchar setresult SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Confirm Inspection Results 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 inspchar setresult FM, simply by entering the name BAPI_INSPCHAR_SETRESULT into the relevant SAP transaction such as SE37 or SE38.

Function Group: 2045
Program Name: SAPL2045
Main Program: SAPL2045
Appliation area: Q
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_INSPCHAR_SETRESULT 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_INSPCHAR_SETRESULT'"Confirm Inspection Results
EXPORTING
INSPLOT = "Inspection lot number
INSPOPER = "Inspection lot operation number
INSPCHAR = "Inspection lot characteristic number
* INSPSAMPLE = 1 "Inspection lot sample number
* CHAR_RESULT = "Inspection Result - Characteristic Level
* SAMPLE_RESULT = "Inspection Result - Sample Level

IMPORTING
RETURN = "Return value

TABLES
* SINGLE_RESULTS = "Inspection results: Single value level
.



IMPORTING Parameters details for BAPI_INSPCHAR_SETRESULT

INSPLOT - Inspection lot number

Data type: BAPI2045D4-INSPLOT
Optional: No
Call by Reference: No ( called with pass by value option)

INSPOPER - Inspection lot operation number

Data type: BAPI2045D4-INSPOPER
Optional: No
Call by Reference: No ( called with pass by value option)

INSPCHAR - Inspection lot characteristic number

Data type: BAPI2045D4-INSPCHAR
Optional: No
Call by Reference: No ( called with pass by value option)

INSPSAMPLE - Inspection lot sample number

Data type: BAPI2045D4-INSPSAMPLE
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHAR_RESULT - Inspection Result - Characteristic Level

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

SAMPLE_RESULT - Inspection Result - Sample Level

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

EXPORTING Parameters details for BAPI_INSPCHAR_SETRESULT

RETURN - Return value

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

TABLES Parameters details for BAPI_INSPCHAR_SETRESULT

SINGLE_RESULTS - Inspection results: Single value level

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

Copy and paste ABAP code example for BAPI_INSPCHAR_SETRESULT 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_return  TYPE BAPIRETURN1, "   
lv_insplot  TYPE BAPI2045D4-INSPLOT, "   
lt_single_results  TYPE STANDARD TABLE OF BAPI2045D4, "   
lv_inspoper  TYPE BAPI2045D4-INSPOPER, "   
lv_inspchar  TYPE BAPI2045D4-INSPCHAR, "   
lv_inspsample  TYPE BAPI2045D4-INSPSAMPLE, "   1
lv_char_result  TYPE BAPI2045D2, "   
lv_sample_result  TYPE BAPI2045D3. "   

  CALL FUNCTION 'BAPI_INSPCHAR_SETRESULT'  "Confirm Inspection Results
    EXPORTING
         INSPLOT = lv_insplot
         INSPOPER = lv_inspoper
         INSPCHAR = lv_inspchar
         INSPSAMPLE = lv_inspsample
         CHAR_RESULT = lv_char_result
         SAMPLE_RESULT = lv_sample_result
    IMPORTING
         RETURN = lv_return
    TABLES
         SINGLE_RESULTS = lt_single_results
. " BAPI_INSPCHAR_SETRESULT




ABAP code using 7.40 inline data declarations to call FM BAPI_INSPCHAR_SETRESULT

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 INSPLOT FROM BAPI2045D4 INTO @DATA(ld_insplot).
 
 
"SELECT single INSPOPER FROM BAPI2045D4 INTO @DATA(ld_inspoper).
 
"SELECT single INSPCHAR FROM BAPI2045D4 INTO @DATA(ld_inspchar).
 
"SELECT single INSPSAMPLE FROM BAPI2045D4 INTO @DATA(ld_inspsample).
DATA(ld_inspsample) = 1.
 
 
 


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!