SAP BAPI_PIRSRVAPS_GETLIST Function Module for Read Planned Independent Requirements for Selection Criteria
BAPI_PIRSRVAPS_GETLIST is a standard bapi pirsrvaps getlist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Planned Independent Requirements for Selection Criteria 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 pirsrvaps getlist FM, simply by entering the name BAPI_PIRSRVAPS_GETLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: 10020
Program Name: SAPL10020
Main Program: SAPL10020
Appliation area: C
Release date: 12-Dec-2002
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_PIRSRVAPS_GETLIST 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_PIRSRVAPS_GETLIST'"Read Planned Independent Requirements for Selection Criteria.
EXPORTING
LOGICAL_SYSTEM = "Source Logical System for Request
* START_TIME = "Start Date/Time for Selection (Format YYYYMMDDhhmmss)
* END_TIME = "End Date/Time for Selection (Format YYYYMMDDhhmmss)
* EXCLUDE_EXPORT_FLAGS = "Restriction of Return Tables to be Filled
* MAX_NUMBER_OF_ENTRIES = "Maximum Number of Lines of Hits
* PLANNING_VERSION = '000' "Planning Version (Operative or Simulation Version)
IMPORTING
NUMBER_OF_ENTRIES = "Number of Entries Found for a Selection
TABLES
* PRODUCT_SELECTION = "Selection Criteria for Products (RANGES Table)
* CFG_PART_OF = "Part_Of Entries for Several Configurations
* CFG_VALUES = "Characteristic Value Assignment of Several Configurations
* CFG_VAR_KEYS = "Variant Condition Keys in Configurations
* CFG_BLOB = "BLOB Internal Configuration Data (SCE)
* DESCRIPTIVE_CHARS = "Descriptive Characteristics
* RETURN = "Return Parameters
* EXTENSION_IN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSION_OUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* PIR_KEYS = "Keys for Planned Independent Requirements
* LOCATION_SELECTION = "Selection Criteria for Locations (RANGES Table)
* LOCTYPE_SELECTION = "Selection Criteria for Location Types (RANGES Table)
* PRODUCT_LOCATION_KEYS = "Selection Criteria for Product+Location
* ATPCAT_SELECTION = "Selection Criteria for ATP Categories
* REQUIREMENTS_DATA = "Planned Independent Requirements for Forecasting
* PEGGING_INPUT_NODES = "Pegging Relationships of INPUT Nodes
* CFG_HEADERS = "CU: Configuration Data
* CFG_INSTANCES = "Instances of Several Configurations
IMPORTING Parameters details for BAPI_PIRSRVAPS_GETLIST
LOGICAL_SYSTEM - Source Logical System for Request
Data type: BAPIGENFIELDS-LOGSYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
START_TIME - Start Date/Time for Selection (Format YYYYMMDDhhmmss)
Data type: BAPIGENFIELDS-START_TOptional: Yes
Call by Reference: No ( called with pass by value option)
END_TIME - End Date/Time for Selection (Format YYYYMMDDhhmmss)
Data type: BAPIGENFIELDS-END_TOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCLUDE_EXPORT_FLAGS - Restriction of Return Tables to be Filled
Data type: BAPI10020SELRETFLAGSOptional: Yes
Call by Reference: No ( called with pass by value option)
MAX_NUMBER_OF_ENTRIES - Maximum Number of Lines of Hits
Data type: BAPIF4A-MAX_ROWSOptional: Yes
Call by Reference: No ( called with pass by value option)
PLANNING_VERSION - Planning Version (Operative or Simulation Version)
Data type: BAPIGENFIELDS-VRSIOEXDefault: '000'
Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_PIRSRVAPS_GETLIST
NUMBER_OF_ENTRIES - Number of Entries Found for a Selection
Data type: BAPIGENFIELDS-SEL_ROWSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_PIRSRVAPS_GETLIST
PRODUCT_SELECTION - Selection Criteria for Products (RANGES Table)
Data type: BAPIPRODUCTRANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
CFG_PART_OF - Part_Of Entries for Several Configurations
Data type: BAPIAPOCUPRTOptional: Yes
Call by Reference: Yes
CFG_VALUES - Characteristic Value Assignment of Several Configurations
Data type: BAPIAPOCUVALOptional: Yes
Call by Reference: Yes
CFG_VAR_KEYS - Variant Condition Keys in Configurations
Data type: BAPIAPOCUVKOptional: Yes
Call by Reference: Yes
CFG_BLOB - BLOB Internal Configuration Data (SCE)
Data type: BAPIAPOCUBLBOptional: Yes
Call by Reference: Yes
DESCRIPTIVE_CHARS - Descriptive Characteristics
Data type: BAPI10020PIRDESCRCHAROUTOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
EXTENSION_IN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
EXTENSION_OUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
PIR_KEYS - Keys for Planned Independent Requirements
Data type: BAPI10020PIRKEYINOptional: Yes
Call by Reference: Yes
LOCATION_SELECTION - Selection Criteria for Locations (RANGES Table)
Data type: BAPILOCRANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
LOCTYPE_SELECTION - Selection Criteria for Location Types (RANGES Table)
Data type: BAPILOCTYPERANGEOptional: Yes
Call by Reference: No ( called with pass by value option)
PRODUCT_LOCATION_KEYS - Selection Criteria for Product+Location
Data type: BAPI_PRODLOC_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
ATPCAT_SELECTION - Selection Criteria for ATP Categories
Data type: BAPIAPOATPCATOptional: Yes
Call by Reference: No ( called with pass by value option)
REQUIREMENTS_DATA - Planned Independent Requirements for Forecasting
Data type: BAPI10020PIROUTOptional: Yes
Call by Reference: Yes
PEGGING_INPUT_NODES - Pegging Relationships of INPUT Nodes
Data type: BAPI10020PIRINPUTPEGOUTOptional: Yes
Call by Reference: No ( called with pass by value option)
CFG_HEADERS - CU: Configuration Data
Data type: BAPIAPOCUCFGOptional: Yes
Call by Reference: Yes
CFG_INSTANCES - Instances of Several Configurations
Data type: BAPIAPOCUINSOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_PIRSRVAPS_GETLIST 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_logical_system | TYPE BAPIGENFIELDS-LOGSYSTEM, " | |||
| lv_number_of_entries | TYPE BAPIGENFIELDS-SEL_ROWS, " | |||
| lt_product_selection | TYPE STANDARD TABLE OF BAPIPRODUCTRANGE, " | |||
| lt_cfg_part_of | TYPE STANDARD TABLE OF BAPIAPOCUPRT, " | |||
| lt_cfg_values | TYPE STANDARD TABLE OF BAPIAPOCUVAL, " | |||
| lt_cfg_var_keys | TYPE STANDARD TABLE OF BAPIAPOCUVK, " | |||
| lt_cfg_blob | TYPE STANDARD TABLE OF BAPIAPOCUBLB, " | |||
| lt_descriptive_chars | TYPE STANDARD TABLE OF BAPI10020PIRDESCRCHAROUT, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_extension_out | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_pir_keys | TYPE STANDARD TABLE OF BAPI10020PIRKEYIN, " | |||
| lv_start_time | TYPE BAPIGENFIELDS-START_T, " | |||
| lt_location_selection | TYPE STANDARD TABLE OF BAPILOCRANGE, " | |||
| lv_end_time | TYPE BAPIGENFIELDS-END_T, " | |||
| lt_loctype_selection | TYPE STANDARD TABLE OF BAPILOCTYPERANGE, " | |||
| lv_exclude_export_flags | TYPE BAPI10020SELRETFLAGS, " | |||
| lt_product_location_keys | TYPE STANDARD TABLE OF BAPI_PRODLOC_KEY, " | |||
| lt_atpcat_selection | TYPE STANDARD TABLE OF BAPIAPOATPCAT, " | |||
| lv_max_number_of_entries | TYPE BAPIF4A-MAX_ROWS, " | |||
| lv_planning_version | TYPE BAPIGENFIELDS-VRSIOEX, " '000' | |||
| lt_requirements_data | TYPE STANDARD TABLE OF BAPI10020PIROUT, " | |||
| lt_pegging_input_nodes | TYPE STANDARD TABLE OF BAPI10020PIRINPUTPEGOUT, " | |||
| lt_cfg_headers | TYPE STANDARD TABLE OF BAPIAPOCUCFG, " | |||
| lt_cfg_instances | TYPE STANDARD TABLE OF BAPIAPOCUINS. " |
|   CALL FUNCTION 'BAPI_PIRSRVAPS_GETLIST' "Read Planned Independent Requirements for Selection Criteria |
| EXPORTING | ||
| LOGICAL_SYSTEM | = lv_logical_system | |
| START_TIME | = lv_start_time | |
| END_TIME | = lv_end_time | |
| EXCLUDE_EXPORT_FLAGS | = lv_exclude_export_flags | |
| MAX_NUMBER_OF_ENTRIES | = lv_max_number_of_entries | |
| PLANNING_VERSION | = lv_planning_version | |
| IMPORTING | ||
| NUMBER_OF_ENTRIES | = lv_number_of_entries | |
| TABLES | ||
| PRODUCT_SELECTION | = lt_product_selection | |
| CFG_PART_OF | = lt_cfg_part_of | |
| CFG_VALUES | = lt_cfg_values | |
| CFG_VAR_KEYS | = lt_cfg_var_keys | |
| CFG_BLOB | = lt_cfg_blob | |
| DESCRIPTIVE_CHARS | = lt_descriptive_chars | |
| RETURN | = lt_return | |
| EXTENSION_IN | = lt_extension_in | |
| EXTENSION_OUT | = lt_extension_out | |
| PIR_KEYS | = lt_pir_keys | |
| LOCATION_SELECTION | = lt_location_selection | |
| LOCTYPE_SELECTION | = lt_loctype_selection | |
| PRODUCT_LOCATION_KEYS | = lt_product_location_keys | |
| ATPCAT_SELECTION | = lt_atpcat_selection | |
| REQUIREMENTS_DATA | = lt_requirements_data | |
| PEGGING_INPUT_NODES | = lt_pegging_input_nodes | |
| CFG_HEADERS | = lt_cfg_headers | |
| CFG_INSTANCES | = lt_cfg_instances | |
| . " BAPI_PIRSRVAPS_GETLIST | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_PIRSRVAPS_GETLIST
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 LOGSYSTEM FROM BAPIGENFIELDS INTO @DATA(ld_logical_system). | ||||
| "SELECT single SEL_ROWS FROM BAPIGENFIELDS INTO @DATA(ld_number_of_entries). | ||||
| "SELECT single START_T FROM BAPIGENFIELDS INTO @DATA(ld_start_time). | ||||
| "SELECT single END_T FROM BAPIGENFIELDS INTO @DATA(ld_end_time). | ||||
| "SELECT single MAX_ROWS FROM BAPIF4A INTO @DATA(ld_max_number_of_entries). | ||||
| "SELECT single VRSIOEX FROM BAPIGENFIELDS INTO @DATA(ld_planning_version). | ||||
| DATA(ld_planning_version) | = '000'. | |||
Search for further information about these or an SAP related objects