SAP BAPI_PROCRELATION_SAVEMULTI2 Function Module for Create/Change External Procurement Relationship









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

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



Function BAPI_PROCRELATION_SAVEMULTI2 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_SAVEMULTI2'"Create/Change External Procurement Relationship
EXPORTING
LOGICAL_SYSTEM = "Denotes Logical System from which Message Originates
TESTRUN = "Switch to Simulation Session for Write BAPIs
* SYN_POST = ' ' "Checkbox
* CONSIDER_INTERNAL = ' ' "X Field
* IGNORE_MRP_AREAS = ' ' "Select an Option (Yes = 'X', No = ' ')
* CONSIDER_SOURCE_LIST = ' ' "Select an Option (Yes = 'X', No = ' ')
* PARALLEL_PROCESS = ' ' "Select an Option (Yes = 'X', No = ' ')

TABLES
PROC_RELATION = "BAPI Transfer Structure for Maintenance of TPSRC
* COST_SCALESX = "Price Information for External Procurement Relationships - Checkbox
* EXTENSIONIN = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
* EXTENSIONOUT = "Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
RETURN = "Return Parameters
PROC_RELATIONX = "BAPI Transfer Structure for Maintenance of TPSRC: Checkbox - List
* PROC_RELATION_ICH = "BAPI Transfer Structure for Maintenance of ICH Fields
* PROC_RELATION_ICHX = "BAPI Transfer Structure for Maintenance of ICH Fields - Checkbox List
* PROC_RELATION_FR = "BAPI Transfer Structure for Maintenance of F&R Fields
* PROC_RELATION_FRX = "BAPI Transfer Structure for Maintenance of F&R Fields - Checkbox List
* PROC_RELATION_LOCS = "BAPI Tr.-Str. for Maintenance of TPSRC: Destination Location f. Loc-Indep.
* PROC_RELATION_LOCSX = "BAPI Tr.-Str. for Maintenance of TPSRC: Destination Location f. Loc-Indep.
* COST_SCALES = "Price Information for External Procurement Relationships
.



IMPORTING Parameters details for BAPI_PROCRELATION_SAVEMULTI2

LOGICAL_SYSTEM - Denotes Logical System from which Message Originates

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

TESTRUN - Switch to Simulation Session for Write BAPIs

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

SYN_POST - Checkbox

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

CONSIDER_INTERNAL - X Field

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

IGNORE_MRP_AREAS - 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)

PARALLEL_PROCESS - 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_SAVEMULTI2

PROC_RELATION - BAPI Transfer Structure for Maintenance of TPSRC

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

COST_SCALESX - Price Information for External Procurement Relationships - Checkbox

Data type: BAPISCALES2X
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

PROC_RELATIONX - BAPI Transfer Structure for Maintenance of TPSRC: Checkbox - List

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

PROC_RELATION_ICH - BAPI Transfer Structure for Maintenance of ICH Fields

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

PROC_RELATION_ICHX - BAPI Transfer Structure for Maintenance of ICH Fields - Checkbox List

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

PROC_RELATION_FR - BAPI Transfer Structure for Maintenance of F&R Fields

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

PROC_RELATION_FRX - BAPI Transfer Structure for Maintenance of F&R Fields - Checkbox List

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

PROC_RELATION_LOCS - BAPI Tr.-Str. for Maintenance of TPSRC: Destination Location f. Loc-Indep.

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

PROC_RELATION_LOCSX - BAPI Tr.-Str. for Maintenance of TPSRC: Destination Location f. Loc-Indep.

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

COST_SCALES - Price Information for External Procurement Relationships

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

Copy and paste ABAP code example for BAPI_PROCRELATION_SAVEMULTI2 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:
lt_proc_relation  TYPE STANDARD TABLE OF BAPITPSRC2, "   
lv_logical_system  TYPE BAPISCMBGENFIELDS-LOGICAL_SYSTEM, "   
lt_cost_scalesx  TYPE STANDARD TABLE OF BAPISCALES2X, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_extensionout  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_testrun  TYPE BAPI10008PARAMS-TESTRUN, "   
lt_proc_relationx  TYPE STANDARD TABLE OF BAPITPSRC2X, "   
lv_syn_post  TYPE BAPISCMBGENFIELDS-XFELD, "   ' '
lt_proc_relation_ich  TYPE STANDARD TABLE OF BAPITPSRC_ICH, "   
lv_consider_internal  TYPE BAPISCMBGENFIELDS-XFELD, "   ' '
lt_proc_relation_ichx  TYPE STANDARD TABLE OF BAPITPSRC_ICHX, "   
lv_ignore_mrp_areas  TYPE BAPISCMBGENFIELDS-XFELD, "   ' '
lt_proc_relation_fr  TYPE STANDARD TABLE OF BAPITPSRC_FR, "   
lt_proc_relation_frx  TYPE STANDARD TABLE OF BAPITPSRC_FRX, "   
lv_consider_source_list  TYPE BAPIYESNO, "   ' '
lv_parallel_process  TYPE BAPIYESNO, "   ' '
lt_proc_relation_locs  TYPE STANDARD TABLE OF BAPITPSRC_LOCS, "   
lt_proc_relation_locsx  TYPE STANDARD TABLE OF BAPITPSRC_LOCSX, "   
lt_cost_scales  TYPE STANDARD TABLE OF BAPISCALES2. "   

  CALL FUNCTION 'BAPI_PROCRELATION_SAVEMULTI2'  "Create/Change External Procurement Relationship
    EXPORTING
         LOGICAL_SYSTEM = lv_logical_system
         TESTRUN = lv_testrun
         SYN_POST = lv_syn_post
         CONSIDER_INTERNAL = lv_consider_internal
         IGNORE_MRP_AREAS = lv_ignore_mrp_areas
         CONSIDER_SOURCE_LIST = lv_consider_source_list
         PARALLEL_PROCESS = lv_parallel_process
    TABLES
         PROC_RELATION = lt_proc_relation
         COST_SCALESX = lt_cost_scalesx
         EXTENSIONIN = lt_extensionin
         EXTENSIONOUT = lt_extensionout
         RETURN = lt_return
         PROC_RELATIONX = lt_proc_relationx
         PROC_RELATION_ICH = lt_proc_relation_ich
         PROC_RELATION_ICHX = lt_proc_relation_ichx
         PROC_RELATION_FR = lt_proc_relation_fr
         PROC_RELATION_FRX = lt_proc_relation_frx
         PROC_RELATION_LOCS = lt_proc_relation_locs
         PROC_RELATION_LOCSX = lt_proc_relation_locsx
         COST_SCALES = lt_cost_scales
. " BAPI_PROCRELATION_SAVEMULTI2




ABAP code using 7.40 inline data declarations to call FM BAPI_PROCRELATION_SAVEMULTI2

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 TESTRUN FROM BAPI10008PARAMS INTO @DATA(ld_testrun).
 
 
"SELECT single XFELD FROM BAPISCMBGENFIELDS INTO @DATA(ld_syn_post).
DATA(ld_syn_post) = ' '.
 
 
"SELECT single XFELD FROM BAPISCMBGENFIELDS INTO @DATA(ld_consider_internal).
DATA(ld_consider_internal) = ' '.
 
 
"SELECT single XFELD FROM BAPISCMBGENFIELDS INTO @DATA(ld_ignore_mrp_areas).
DATA(ld_ignore_mrp_areas) = ' '.
 
 
 
DATA(ld_consider_source_list) = ' '.
 
DATA(ld_parallel_process) = ' '.
 
 
 
 


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!