SAP AVAILABILITY_CHECK Function Module for NOTRANSL: ATP: Verfügbarkeitsprüfung intern









AVAILABILITY_CHECK is a standard availability check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: ATP: Verfügbarkeitsprüfung intern 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 availability check FM, simply by entering the name AVAILABILITY_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: ATPC
Program Name: SAPLATPC
Main Program: SAPLATPC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function AVAILABILITY_CHECK 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 'AVAILABILITY_CHECK'"NOTRANSL: ATP: Verfügbarkeitsprüfung intern
EXPORTING
* P_SCHEDSH = "
* P_SCHEDTR = "

CHANGING
* P_ATPCA = "Control Parameters
* P_ATPCB = "
* P_ATPCC = "

TABLES
* P_ATPALLX = "
* P_ATPPLANTX = "Plant Data
* P_ATPREX = "
* P_ATPSDUX = "
* P_ATPSOPX = "
* P_ATPSSPX = "
* P_ATPTERMX = "ATP: Shipping and Transportation Scheduling Dates/Times
* P_ATPREQTERMX = "
* P_MDVEX = "
* P_MDVEX_R3 = "
* P_MDVEX_APO = "
* P_ATPASSRESX = "
* P_QTDERGX = "
* P_QTDOBJX = "
* P_QTDQTYX = "
* P_T441VX = "Scope of Check
* P_TMVFX = "Availability Check Control
* P_ATPDIAX = "
* P_ATPDIAWX = "
* P_QUOT_CHX = "
* P_QUOT_VBX = "
* P_ATPRG_OUTX = "
* P_ATPASSX = "
* P_ATP_GRP = "
* P_ATP_GRPMB = "
P_ATPCSX = "Requirements Table
* P_ATPCSX_R3 = "
* P_ATPDSX = "
* P_ATPFIELDX = "
* P_ATPMATX = "
* P_ATPMATX_R3 = "

EXCEPTIONS
ERROR = 1
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLATPC_001 Processing Requirements Table Before Calling Actual Check
EXIT_SAPLATPC_002 Processing Results of Actual Check

IMPORTING Parameters details for AVAILABILITY_CHECK

P_SCHEDSH -

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

P_SCHEDTR -

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

CHANGING Parameters details for AVAILABILITY_CHECK

P_ATPCA - Control Parameters

Data type: ATPCA
Optional: Yes
Call by Reference: Yes

P_ATPCB -

Data type: ATPCB
Optional: Yes
Call by Reference: Yes

P_ATPCC -

Data type: ATPCC
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for AVAILABILITY_CHECK

P_ATPALLX -

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

P_ATPPLANTX - Plant Data

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

P_ATPREX -

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

P_ATPSDUX -

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

P_ATPSOPX -

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

P_ATPSSPX -

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

P_ATPTERMX - ATP: Shipping and Transportation Scheduling Dates/Times

Data type: ATPTERM
Optional: Yes
Call by Reference: Yes

P_ATPREQTERMX -

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

P_MDVEX -

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

P_MDVEX_R3 -

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

P_MDVEX_APO -

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

P_ATPASSRESX -

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

P_QTDERGX -

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

P_QTDOBJX -

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

P_QTDQTYX -

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

P_T441VX - Scope of Check

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

P_TMVFX - Availability Check Control

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

P_ATPDIAX -

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

P_ATPDIAWX -

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

P_QUOT_CHX -

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

P_QUOT_VBX -

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

P_ATPRG_OUTX -

Data type: SATPRG_OUT
Optional: Yes
Call by Reference: Yes

P_ATPASSX -

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

P_ATP_GRP -

Data type: ATP_GRP
Optional: Yes
Call by Reference: Yes

P_ATP_GRPMB -

Data type: ATP_GRPMB
Optional: Yes
Call by Reference: Yes

P_ATPCSX - Requirements Table

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

P_ATPCSX_R3 -

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

P_ATPDSX -

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

P_ATPFIELDX -

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

P_ATPMATX -

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

P_ATPMATX_R3 -

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

EXCEPTIONS details

ERROR - Errors

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

Copy and paste ABAP code example for AVAILABILITY_CHECK 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_error  TYPE STRING, "   
lv_p_atpca  TYPE ATPCA, "   
lt_p_atpallx  TYPE STANDARD TABLE OF ATPALL, "   
lv_p_schedsh  TYPE TVAK-VSTRM, "   
lt_p_atpplantx  TYPE STANDARD TABLE OF ATPPLANT, "   
lt_p_atprex  TYPE STANDARD TABLE OF ATPRE, "   
lt_p_atpsdux  TYPE STANDARD TABLE OF ATPSDU, "   
lt_p_atpsopx  TYPE STANDARD TABLE OF ATPSOP, "   
lt_p_atpsspx  TYPE STANDARD TABLE OF ATPSSP, "   
lt_p_atptermx  TYPE STANDARD TABLE OF ATPTERM, "   
lt_p_atpreqtermx  TYPE STANDARD TABLE OF ATPREQTERM, "   
lt_p_mdvex  TYPE STANDARD TABLE OF MDVE, "   
lt_p_mdvex_r3  TYPE STANDARD TABLE OF MDVE, "   
lt_p_mdvex_apo  TYPE STANDARD TABLE OF MDVE, "   
lv_p_atpcb  TYPE ATPCB, "   
lv_p_schedtr  TYPE TVAK-TRTRM, "   
lt_p_atpassresx  TYPE STANDARD TABLE OF KV03V, "   
lt_p_qtdergx  TYPE STANDARD TABLE OF QUOTP3D, "   
lt_p_qtdobjx  TYPE STANDARD TABLE OF QVP5V, "   
lt_p_qtdqtyx  TYPE STANDARD TABLE OF QUOTP6, "   
lt_p_t441vx  TYPE STANDARD TABLE OF T441V, "   
lt_p_tmvfx  TYPE STANDARD TABLE OF TMVF, "   
lt_p_atpdiax  TYPE STANDARD TABLE OF ATPDIA, "   
lt_p_atpdiawx  TYPE STANDARD TABLE OF ATPDIAW, "   
lt_p_quot_chx  TYPE STANDARD TABLE OF QUOT_CH, "   
lt_p_quot_vbx  TYPE STANDARD TABLE OF QUOT_VB, "   
lt_p_atprg_outx  TYPE STANDARD TABLE OF SATPRG_OUT, "   
lv_p_atpcc  TYPE ATPCC, "   
lt_p_atpassx  TYPE STANDARD TABLE OF ATPASS, "   
lt_p_atp_grp  TYPE STANDARD TABLE OF ATP_GRP, "   
lt_p_atp_grpmb  TYPE STANDARD TABLE OF ATP_GRPMB, "   
lt_p_atpcsx  TYPE STANDARD TABLE OF ATPCS, "   
lt_p_atpcsx_r3  TYPE STANDARD TABLE OF ATPCS, "   
lt_p_atpdsx  TYPE STANDARD TABLE OF ATPDS, "   
lt_p_atpfieldx  TYPE STANDARD TABLE OF ATPFIELD, "   
lt_p_atpmatx  TYPE STANDARD TABLE OF ATPMAT, "   
lt_p_atpmatx_r3  TYPE STANDARD TABLE OF ATPMAT. "   

  CALL FUNCTION 'AVAILABILITY_CHECK'  "NOTRANSL: ATP: Verfügbarkeitsprüfung intern
    EXPORTING
         P_SCHEDSH = lv_p_schedsh
         P_SCHEDTR = lv_p_schedtr
    CHANGING
         P_ATPCA = lv_p_atpca
         P_ATPCB = lv_p_atpcb
         P_ATPCC = lv_p_atpcc
    TABLES
         P_ATPALLX = lt_p_atpallx
         P_ATPPLANTX = lt_p_atpplantx
         P_ATPREX = lt_p_atprex
         P_ATPSDUX = lt_p_atpsdux
         P_ATPSOPX = lt_p_atpsopx
         P_ATPSSPX = lt_p_atpsspx
         P_ATPTERMX = lt_p_atptermx
         P_ATPREQTERMX = lt_p_atpreqtermx
         P_MDVEX = lt_p_mdvex
         P_MDVEX_R3 = lt_p_mdvex_r3
         P_MDVEX_APO = lt_p_mdvex_apo
         P_ATPASSRESX = lt_p_atpassresx
         P_QTDERGX = lt_p_qtdergx
         P_QTDOBJX = lt_p_qtdobjx
         P_QTDQTYX = lt_p_qtdqtyx
         P_T441VX = lt_p_t441vx
         P_TMVFX = lt_p_tmvfx
         P_ATPDIAX = lt_p_atpdiax
         P_ATPDIAWX = lt_p_atpdiawx
         P_QUOT_CHX = lt_p_quot_chx
         P_QUOT_VBX = lt_p_quot_vbx
         P_ATPRG_OUTX = lt_p_atprg_outx
         P_ATPASSX = lt_p_atpassx
         P_ATP_GRP = lt_p_atp_grp
         P_ATP_GRPMB = lt_p_atp_grpmb
         P_ATPCSX = lt_p_atpcsx
         P_ATPCSX_R3 = lt_p_atpcsx_r3
         P_ATPDSX = lt_p_atpdsx
         P_ATPFIELDX = lt_p_atpfieldx
         P_ATPMATX = lt_p_atpmatx
         P_ATPMATX_R3 = lt_p_atpmatx_r3
    EXCEPTIONS
        ERROR = 1
. " AVAILABILITY_CHECK




ABAP code using 7.40 inline data declarations to call FM AVAILABILITY_CHECK

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 VSTRM FROM TVAK INTO @DATA(ld_p_schedsh).
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single TRTRM FROM TVAK INTO @DATA(ld_p_schedtr).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!