SAP BAPI_PROCRELATION_GETLIST2 Function Module for Get Procurement Relationship Data









BAPI_PROCRELATION_GETLIST2 is a standard bapi procrelation getlist2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Procurement Relationship Data 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 procrelation getlist2 FM, simply by entering the name BAPI_PROCRELATION_GETLIST2 into the relevant SAP transaction such as SE37 or SE38.

Function Group: 10008
Program Name: SAPL10008
Main Program: SAPL10008
Appliation area:
Release date: 13-Jan-2006
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BAPI_PROCRELATION_GETLIST2 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_PROCRELATION_GETLIST2'"Get Procurement Relationship Data
EXPORTING
LOGICAL_SYSTEM = "Denotes Logical System from which Source of Supply Originates
* PROC_VALID_FROM_TIME = "Start Date/Time (in UTC Time and Format YYYYMMDDhhmmss)
* PROC_VALID_TO_TIME = "End Date/Time (in UTC Time and Format YYYYMMDDhhmmss)
* PROC_FORM = "Type of Procurement
* PROCESS_TYPE_ICH = "Process Type for ICH
* READ_COSTS = 'X' "Select an Option (Yes = 'X', No = ' ')
* CONSIDER_INTERNAL = ' ' "Select an Option (Yes = 'X', No = ' ')
* CONSIDER_SOURCE_LIST = ' ' "Select an Option (Yes = 'X', No = ' ')

TABLES
* PROC_RELATION_ID = "Range Table for ProcRelationID
* PROC_RELATION_FR = "Enhanced Output Structure for Forecast & Replenishment (F&R)
* PROC_RELATION_ICH = "Enhanced Output Structure for Inventory Collaboration Hub (ICH)
* COST_SCALES = "Price Information Structure
* EXTENSIONIN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSIONOUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
RETURN = "Return Parameters
* LOCATION_TO = "RANGES Table for Locations
* LOCATION_FROM = "RANGES Table for Locations
* PRODUCT_NUMBER = "RANGES Table for Products
* PUR_DOC_NO = "Ranges Table for Order Number
* PUR_DOC_ITEM = "Ranges Table for Document Item Number
* PURCH_ORG = "Ranges Table for Purchasing Organization
* PROC_DOC_CAT = "Range Table for Source of Supply Type
PROC_RELATION = "Output Structure for External Procurement Relationship
.



IMPORTING Parameters details for BAPI_PROCRELATION_GETLIST2

LOGICAL_SYSTEM - Denotes Logical System from which Source of Supply Originates

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

PROC_VALID_FROM_TIME - Start Date/Time (in UTC Time and Format YYYYMMDDhhmmss)

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

PROC_VALID_TO_TIME - End Date/Time (in UTC Time and Format YYYYMMDDhhmmss)

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

PROC_FORM - Type of Procurement

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

PROCESS_TYPE_ICH - Process Type for ICH

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

READ_COSTS - Select an Option (Yes = 'X', No = ' ')

Data type: BAPISCMBGENFIELDS-XFELD
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONSIDER_INTERNAL - Select an Option (Yes = 'X', No = ' ')

Data type: BAPISCMBGENFIELDS-XFELD
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONSIDER_SOURCE_LIST - Select an Option (Yes = 'X', No = ' ')

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

TABLES Parameters details for BAPI_PROCRELATION_GETLIST2

PROC_RELATION_ID - Range Table for ProcRelationID

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

PROC_RELATION_FR - Enhanced Output Structure for Forecast & Replenishment (F&R)

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

PROC_RELATION_ICH - Enhanced Output Structure for Inventory Collaboration Hub (ICH)

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

COST_SCALES - Price Information Structure

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

EXTENSIONIN - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut

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

EXTENSIONOUT - Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut

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

RETURN - Return Parameters

Data type: BAPIRET2
Optional: No
Call by Reference: Yes

LOCATION_TO - RANGES Table for Locations

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

LOCATION_FROM - RANGES Table for Locations

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

PRODUCT_NUMBER - RANGES Table for Products

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

PUR_DOC_NO - Ranges Table for Order Number

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

PUR_DOC_ITEM - Ranges Table for Document Item Number

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

PURCH_ORG - Ranges Table for Purchasing Organization

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

PROC_DOC_CAT - Range Table for Source of Supply Type

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

PROC_RELATION - Output Structure for External Procurement Relationship

Data type: BAPITPSRC_OUT
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_PROCRELATION_GETLIST2 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 BAPISCMBGENFIELDS-LOGICAL_SYSTEM, "   
lt_proc_relation_id  TYPE STANDARD TABLE OF BAPIPROCRELATIONIDLIST, "   
lt_proc_relation_fr  TYPE STANDARD TABLE OF BAPITPSRC_FR_OUT, "   
lt_proc_relation_ich  TYPE STANDARD TABLE OF BAPITPSRC_ICH_OUT, "   
lt_cost_scales  TYPE STANDARD TABLE OF BAPISCALES2, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_extensionout  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lt_location_to  TYPE STANDARD TABLE OF BAPILOCTORANGE, "   
lv_proc_valid_from_time  TYPE BAPI10008FIELDS-START_T, "   
lt_location_from  TYPE STANDARD TABLE OF BAPILOCFROMRANGE, "   
lv_proc_valid_to_time  TYPE BAPI10008FIELDS-END_T, "   
lv_proc_form  TYPE BAPIPROCFORM_S-PROCFORM, "   
lt_product_number  TYPE STANDARD TABLE OF BAPIPRODUCTRANGE, "   
lt_pur_doc_no  TYPE STANDARD TABLE OF BAPIPROCDOCNORANGE, "   
lv_process_type_ich  TYPE BAPIPROCESSICH_S-PROCESSICH, "   
lv_read_costs  TYPE BAPISCMBGENFIELDS-XFELD, "   'X'
lt_pur_doc_item  TYPE STANDARD TABLE OF BAPIPROCDOCITEMRANGE, "   
lt_purch_org  TYPE STANDARD TABLE OF BAPIPROCPURCHORGRANGE, "   
lv_consider_internal  TYPE BAPISCMBGENFIELDS-XFELD, "   ' '
lt_proc_doc_cat  TYPE STANDARD TABLE OF BAPIPROCDOCCATRANGE, "   
lv_consider_source_list  TYPE BAPIYESNO, "   ' '
lt_proc_relation  TYPE STANDARD TABLE OF BAPITPSRC_OUT. "   

  CALL FUNCTION 'BAPI_PROCRELATION_GETLIST2'  "Get Procurement Relationship Data
    EXPORTING
         LOGICAL_SYSTEM = lv_logical_system
         PROC_VALID_FROM_TIME = lv_proc_valid_from_time
         PROC_VALID_TO_TIME = lv_proc_valid_to_time
         PROC_FORM = lv_proc_form
         PROCESS_TYPE_ICH = lv_process_type_ich
         READ_COSTS = lv_read_costs
         CONSIDER_INTERNAL = lv_consider_internal
         CONSIDER_SOURCE_LIST = lv_consider_source_list
    TABLES
         PROC_RELATION_ID = lt_proc_relation_id
         PROC_RELATION_FR = lt_proc_relation_fr
         PROC_RELATION_ICH = lt_proc_relation_ich
         COST_SCALES = lt_cost_scales
         EXTENSIONIN = lt_extensionin
         EXTENSIONOUT = lt_extensionout
         RETURN = lt_return
         LOCATION_TO = lt_location_to
         LOCATION_FROM = lt_location_from
         PRODUCT_NUMBER = lt_product_number
         PUR_DOC_NO = lt_pur_doc_no
         PUR_DOC_ITEM = lt_pur_doc_item
         PURCH_ORG = lt_purch_org
         PROC_DOC_CAT = lt_proc_doc_cat
         PROC_RELATION = lt_proc_relation
. " BAPI_PROCRELATION_GETLIST2




ABAP code using 7.40 inline data declarations to call FM BAPI_PROCRELATION_GETLIST2

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 LOGICAL_SYSTEM FROM BAPISCMBGENFIELDS INTO @DATA(ld_logical_system).
 
 
 
 
 
 
 
 
 
"SELECT single START_T FROM BAPI10008FIELDS INTO @DATA(ld_proc_valid_from_time).
 
 
"SELECT single END_T FROM BAPI10008FIELDS INTO @DATA(ld_proc_valid_to_time).
 
"SELECT single PROCFORM FROM BAPIPROCFORM_S INTO @DATA(ld_proc_form).
 
 
 
"SELECT single PROCESSICH FROM BAPIPROCESSICH_S INTO @DATA(ld_process_type_ich).
 
"SELECT single XFELD FROM BAPISCMBGENFIELDS INTO @DATA(ld_read_costs).
DATA(ld_read_costs) = 'X'.
 
 
 
"SELECT single XFELD FROM BAPISCMBGENFIELDS INTO @DATA(ld_consider_internal).
DATA(ld_consider_internal) = ' '.
 
 
DATA(ld_consider_source_list) = ' '.
 
 


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!