SAP AIPA_GET_PLAN_VERSIONS Function Module for
AIPA_GET_PLAN_VERSIONS is a standard aipa get plan versions SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 aipa get plan versions FM, simply by entering the name AIPA_GET_PLAN_VERSIONS into the relevant SAP transaction such as SE37 or SE38.
Function Group: AIPA_F4
Program Name: SAPLAIPA_F4
Main Program:
Appliation area: A
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AIPA_GET_PLAN_VERSIONS 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 'AIPA_GET_PLAN_VERSIONS'".
EXPORTING
* I_PRART = "
* I_PRNAM = "
I_GJAHR = "
IMPORTING
E_PRART = "
E_FLG_NO_VERSIONS_USED = "
TABLES
* IT_RANGE_VERSION = "
* ET_TAIF2 = "
* ET_TAIF7 = "
EXCEPTIONS
PROGRAM_TYPE_NOT_FOUND = 1 PROGRAM_NOT_FOUND = 2 NO_VERSION_FOUND = 3
IMPORTING Parameters details for AIPA_GET_PLAN_VERSIONS
I_PRART -
Data type: IMTP-PRARTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PRNAM -
Data type: IMTP-PRNAMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_GJAHR -
Data type: IMTP-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for AIPA_GET_PLAN_VERSIONS
E_PRART -
Data type: IMTP-PRARTOptional: No
Call by Reference: No ( called with pass by value option)
E_FLG_NO_VERSIONS_USED -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for AIPA_GET_PLAN_VERSIONS
IT_RANGE_VERSION -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
ET_TAIF2 -
Data type: TAIF2Optional: Yes
Call by Reference: No ( called with pass by value option)
ET_TAIF7 -
Data type: TAIF7Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PROGRAM_TYPE_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROGRAM_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VERSION_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for AIPA_GET_PLAN_VERSIONS 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_e_prart | TYPE IMTP-PRART, " | |||
| lv_i_prart | TYPE IMTP-PRART, " | |||
| lt_it_range_version | TYPE STANDARD TABLE OF IMTP, " | |||
| lv_program_type_not_found | TYPE IMTP, " | |||
| lv_i_prnam | TYPE IMTP-PRNAM, " | |||
| lt_et_taif2 | TYPE STANDARD TABLE OF TAIF2, " | |||
| lv_program_not_found | TYPE TAIF2, " | |||
| lv_e_flg_no_versions_used | TYPE C, " | |||
| lv_i_gjahr | TYPE IMTP-GJAHR, " | |||
| lt_et_taif7 | TYPE STANDARD TABLE OF TAIF7, " | |||
| lv_no_version_found | TYPE TAIF7. " |
|   CALL FUNCTION 'AIPA_GET_PLAN_VERSIONS' " |
| EXPORTING | ||
| I_PRART | = lv_i_prart | |
| I_PRNAM | = lv_i_prnam | |
| I_GJAHR | = lv_i_gjahr | |
| IMPORTING | ||
| E_PRART | = lv_e_prart | |
| E_FLG_NO_VERSIONS_USED | = lv_e_flg_no_versions_used | |
| TABLES | ||
| IT_RANGE_VERSION | = lt_it_range_version | |
| ET_TAIF2 | = lt_et_taif2 | |
| ET_TAIF7 | = lt_et_taif7 | |
| EXCEPTIONS | ||
| PROGRAM_TYPE_NOT_FOUND = 1 | ||
| PROGRAM_NOT_FOUND = 2 | ||
| NO_VERSION_FOUND = 3 | ||
| . " AIPA_GET_PLAN_VERSIONS | ||
ABAP code using 7.40 inline data declarations to call FM AIPA_GET_PLAN_VERSIONS
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 PRART FROM IMTP INTO @DATA(ld_e_prart). | ||||
| "SELECT single PRART FROM IMTP INTO @DATA(ld_i_prart). | ||||
| "SELECT single PRNAM FROM IMTP INTO @DATA(ld_i_prnam). | ||||
| "SELECT single GJAHR FROM IMTP INTO @DATA(ld_i_gjahr). | ||||
Search for further information about these or an SAP related objects