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-VSTRMOptional: Yes
Call by Reference: No ( called with pass by value option)
P_SCHEDTR -
Data type: TVAK-TRTRMOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for AVAILABILITY_CHECK
P_ATPCA - Control Parameters
Data type: ATPCAOptional: Yes
Call by Reference: Yes
P_ATPCB -
Data type: ATPCBOptional: Yes
Call by Reference: Yes
P_ATPCC -
Data type: ATPCCOptional: Yes
Call by Reference: Yes
TABLES Parameters details for AVAILABILITY_CHECK
P_ATPALLX -
Data type: ATPALLOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPPLANTX - Plant Data
Data type: ATPPLANTOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPREX -
Data type: ATPREOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPSDUX -
Data type: ATPSDUOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPSOPX -
Data type: ATPSOPOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPSSPX -
Data type: ATPSSPOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPTERMX - ATP: Shipping and Transportation Scheduling Dates/Times
Data type: ATPTERMOptional: Yes
Call by Reference: Yes
P_ATPREQTERMX -
Data type: ATPREQTERMOptional: Yes
Call by Reference: No ( called with pass by value option)
P_MDVEX -
Data type: MDVEOptional: Yes
Call by Reference: No ( called with pass by value option)
P_MDVEX_R3 -
Data type: MDVEOptional: Yes
Call by Reference: No ( called with pass by value option)
P_MDVEX_APO -
Data type: MDVEOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPASSRESX -
Data type: KV03VOptional: Yes
Call by Reference: No ( called with pass by value option)
P_QTDERGX -
Data type: QUOTP3DOptional: Yes
Call by Reference: No ( called with pass by value option)
P_QTDOBJX -
Data type: QVP5VOptional: Yes
Call by Reference: No ( called with pass by value option)
P_QTDQTYX -
Data type: QUOTP6Optional: Yes
Call by Reference: No ( called with pass by value option)
P_T441VX - Scope of Check
Data type: T441VOptional: Yes
Call by Reference: No ( called with pass by value option)
P_TMVFX - Availability Check Control
Data type: TMVFOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPDIAX -
Data type: ATPDIAOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPDIAWX -
Data type: ATPDIAWOptional: Yes
Call by Reference: No ( called with pass by value option)
P_QUOT_CHX -
Data type: QUOT_CHOptional: Yes
Call by Reference: No ( called with pass by value option)
P_QUOT_VBX -
Data type: QUOT_VBOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPRG_OUTX -
Data type: SATPRG_OUTOptional: Yes
Call by Reference: Yes
P_ATPASSX -
Data type: ATPASSOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATP_GRP -
Data type: ATP_GRPOptional: Yes
Call by Reference: Yes
P_ATP_GRPMB -
Data type: ATP_GRPMBOptional: Yes
Call by Reference: Yes
P_ATPCSX - Requirements Table
Data type: ATPCSOptional: No
Call by Reference: No ( called with pass by value option)
P_ATPCSX_R3 -
Data type: ATPCSOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPDSX -
Data type: ATPDSOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPFIELDX -
Data type: ATPFIELDOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPMATX -
Data type: ATPMATOptional: Yes
Call by Reference: No ( called with pass by value option)
P_ATPMATX_R3 -
Data type: ATPMATOptional: 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