SAP BAPI_POSRVAPS_CREATESNPORDER Function Module for Create or Change Stock Transfers or Purchase Requisitions for SNP









BAPI_POSRVAPS_CREATESNPORDER is a standard bapi posrvaps createsnporder 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 or Change Stock Transfers or Purchase Requisitions for SNP 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 posrvaps createsnporder FM, simply by entering the name BAPI_POSRVAPS_CREATESNPORDER into the relevant SAP transaction such as SE37 or SE38.

Function Group: 10502
Program Name: SAPL10502
Main Program: SAPL10502
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BAPI_POSRVAPS_CREATESNPORDER 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_POSRVAPS_CREATESNPORDER'"Create or Change Stock Transfers or Purchase Requisitions for SNP
EXPORTING
LOGICAL_SYSTEM = "Logisches System, aus dem die Anfrage stammt
* APPLICATION = 'SNP' "Applikationskennzeichen
* EXT_NUMBER_ASSIGNMENT = "Kennzeichen, ob externe Nummernvergabe erfolgen soll
* COMMIT_CONTROL = 'E' "Verbuchungssteuerung
* PLNG_VERSION = '000' "Planversion (operativ oder eine Simulationsversion)
* CHANGE_IF_EXISTS = "Ändern des Objektes, falls es schon existiert
* EVENT_CONTROL = ' ' "Steuerung der Ereigniserzeugung
* CHECK_SOURCE_EXISTENCE = 'X' "Prüfung, ob gültige Bezugsquelle für Umlagerungen existiert

TABLES
ORDER_DATA = "Daten für SNP/Deployment Fremdbeschaffungsaunforderungen
* MAPPING_DATA = "Mappinginformationen zu neu angelegten Aufträgen
* RETURN = "Returnparameter
* EXTENSION_IN = "Bezugsstruktur für BAPI-Parameter ExtensionIn / ExtensionOut
.




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_SAPL10502_001 User Exit for Method 'SaveMultiple' of Business Object BUS10502
EXIT_SAPL10502_002 User Exit for Method 'GetList'
EXIT_SAPL10502_003 User Exit for Method 'DeleteMultiple' of Business Object BUS10502
EXIT_SAPL10502_004 User Exit for Method 'RemoveItems' of Business Objects BUS10502

IMPORTING Parameters details for BAPI_POSRVAPS_CREATESNPORDER

LOGICAL_SYSTEM - Logisches System, aus dem die Anfrage stammt

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

APPLICATION - Applikationskennzeichen

Data type: BAPI10502GENFIELDS-SNP_APKZ
Default: 'SNP'
Optional: No
Call by Reference: No ( called with pass by value option)

EXT_NUMBER_ASSIGNMENT - Kennzeichen, ob externe Nummernvergabe erfolgen soll

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

COMMIT_CONTROL - Verbuchungssteuerung

Data type: BAPI10502GENFIELDS-COMMCTRL
Default: 'E'
Optional: No
Call by Reference: No ( called with pass by value option)

PLNG_VERSION - Planversion (operativ oder eine Simulationsversion)

Data type: BAPIGENFIELDS-VRSIOEX
Default: '000'
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGE_IF_EXISTS - Ändern des Objektes, falls es schon existiert

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

EVENT_CONTROL - Steuerung der Ereigniserzeugung

Data type: BAPI10502GENFIELDS-EVENT_CONTROL
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_SOURCE_EXISTENCE - Prüfung, ob gültige Bezugsquelle für Umlagerungen existiert

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

TABLES Parameters details for BAPI_POSRVAPS_CREATESNPORDER

ORDER_DATA - Daten für SNP/Deployment Fremdbeschaffungsaunforderungen

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

MAPPING_DATA - Mappinginformationen zu neu angelegten Aufträgen

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

RETURN - Returnparameter

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

EXTENSION_IN - Bezugsstruktur für BAPI-Parameter ExtensionIn / ExtensionOut

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

Copy and paste ABAP code example for BAPI_POSRVAPS_CREATESNPORDER 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_order_data  TYPE STANDARD TABLE OF BAPI10502SNPPOCO, "   
lv_logical_system  TYPE BAPIGENFIELDS-LOGSYSTEM, "   
lv_application  TYPE BAPI10502GENFIELDS-SNP_APKZ, "   'SNP'
lt_mapping_data  TYPE STANDARD TABLE OF BAPI10502ORDMAPRETO, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_ext_number_assignment  TYPE BAPI10502GENFIELDS-EXT_NR_FLAG, "   
lt_extension_in  TYPE STANDARD TABLE OF BAPIPAREX, "   
lv_commit_control  TYPE BAPI10502GENFIELDS-COMMCTRL, "   'E'
lv_plng_version  TYPE BAPIGENFIELDS-VRSIOEX, "   '000'
lv_change_if_exists  TYPE BAPI10502GENFIELDS-CHANGE_IF_EXISTS, "   
lv_event_control  TYPE BAPI10502GENFIELDS-EVENT_CONTROL, "   SPACE
lv_check_source_existence  TYPE BAPI10502GENFIELDS-CHECK_SOURCE. "   'X'

  CALL FUNCTION 'BAPI_POSRVAPS_CREATESNPORDER'  "Create or Change Stock Transfers or Purchase Requisitions for SNP
    EXPORTING
         LOGICAL_SYSTEM = lv_logical_system
         APPLICATION = lv_application
         EXT_NUMBER_ASSIGNMENT = lv_ext_number_assignment
         COMMIT_CONTROL = lv_commit_control
         PLNG_VERSION = lv_plng_version
         CHANGE_IF_EXISTS = lv_change_if_exists
         EVENT_CONTROL = lv_event_control
         CHECK_SOURCE_EXISTENCE = lv_check_source_existence
    TABLES
         ORDER_DATA = lt_order_data
         MAPPING_DATA = lt_mapping_data
         RETURN = lt_return
         EXTENSION_IN = lt_extension_in
. " BAPI_POSRVAPS_CREATESNPORDER




ABAP code using 7.40 inline data declarations to call FM BAPI_POSRVAPS_CREATESNPORDER

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 SNP_APKZ FROM BAPI10502GENFIELDS INTO @DATA(ld_application).
DATA(ld_application) = 'SNP'.
 
 
 
"SELECT single EXT_NR_FLAG FROM BAPI10502GENFIELDS INTO @DATA(ld_ext_number_assignment).
 
 
"SELECT single COMMCTRL FROM BAPI10502GENFIELDS INTO @DATA(ld_commit_control).
DATA(ld_commit_control) = 'E'.
 
"SELECT single VRSIOEX FROM BAPIGENFIELDS INTO @DATA(ld_plng_version).
DATA(ld_plng_version) = '000'.
 
"SELECT single CHANGE_IF_EXISTS FROM BAPI10502GENFIELDS INTO @DATA(ld_change_if_exists).
 
"SELECT single EVENT_CONTROL FROM BAPI10502GENFIELDS INTO @DATA(ld_event_control).
DATA(ld_event_control) = ' '.
 
"SELECT single CHECK_SOURCE FROM BAPI10502GENFIELDS INTO @DATA(ld_check_source_existence).
DATA(ld_check_source_existence) = 'X'.
 


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!