SAP BAPI_INSPLOT_SETUSAGEDECISION Function Module for Automatic Usage Decision









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

Function Group: 2045
Program Name: SAPL2045
Main Program: SAPL2045
Appliation area: Q
Release date: 29-Apr-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_INSPLOT_SETUSAGEDECISION 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_INSPLOT_SETUSAGEDECISION'"Automatic Usage Decision
EXPORTING
NUMBER = "Inspection Lot
UD_DATA = "Data for Making Usage Decision
* LANGUAGE = "Language (Non-ISO and ISO)

IMPORTING
UD_RETURN_DATA = "Return Values After Making Usage Decision
STOCK_DATA = "Stock Data for Inspection Lot
RETURN = "Message Structure

TABLES
* SYSTEM_STATUS = "System Status for Inspection Lot
* USER_STATUS = "User Status for Inspection Lot
.



IMPORTING Parameters details for BAPI_INSPLOT_SETUSAGEDECISION

NUMBER - Inspection Lot

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

UD_DATA - Data for Making Usage Decision

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

LANGUAGE - Language (Non-ISO and ISO)

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

EXPORTING Parameters details for BAPI_INSPLOT_SETUSAGEDECISION

UD_RETURN_DATA - Return Values After Making Usage Decision

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

STOCK_DATA - Stock Data for Inspection Lot

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

RETURN - Message Structure

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

TABLES Parameters details for BAPI_INSPLOT_SETUSAGEDECISION

SYSTEM_STATUS - System Status for Inspection Lot

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

USER_STATUS - User Status for Inspection Lot

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

Copy and paste ABAP code example for BAPI_INSPLOT_SETUSAGEDECISION 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_number  TYPE BAPI2045UD-INSPLOT, "   
lt_system_status  TYPE STANDARD TABLE OF BAPI2045SS, "   
lv_ud_return_data  TYPE BAPI2045UD_RETURN, "   
lv_ud_data  TYPE BAPI2045UD, "   
lv_stock_data  TYPE BAPI2045D_IL2, "   
lt_user_status  TYPE STANDARD TABLE OF BAPI2045US, "   
lv_return  TYPE BAPIRETURN1, "   
lv_language  TYPE BAPI2045LA. "   

  CALL FUNCTION 'BAPI_INSPLOT_SETUSAGEDECISION'  "Automatic Usage Decision
    EXPORTING
         NUMBER = lv_number
         UD_DATA = lv_ud_data
         LANGUAGE = lv_language
    IMPORTING
         UD_RETURN_DATA = lv_ud_return_data
         STOCK_DATA = lv_stock_data
         RETURN = lv_return
    TABLES
         SYSTEM_STATUS = lt_system_status
         USER_STATUS = lt_user_status
. " BAPI_INSPLOT_SETUSAGEDECISION




ABAP code using 7.40 inline data declarations to call FM BAPI_INSPLOT_SETUSAGEDECISION

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 BAPI2045UD INTO @DATA(ld_number).
 
 
 
 
 
 
 
 


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!