SAP BAPI_SALESORDER_SIMULATE Function Module for Sales Order: Simulate Sales Order









BAPI_SALESORDER_SIMULATE is a standard bapi salesorder simulate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Sales Order: Simulate Sales Order 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 salesorder simulate FM, simply by entering the name BAPI_SALESORDER_SIMULATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: 2032
Program Name: SAPL2032
Main Program: SAPL2032
Appliation area: V
Release date: 25-Jul-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_SALESORDER_SIMULATE 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_SALESORDER_SIMULATE'"Sales Order: Simulate Sales Order
EXPORTING
ORDER_HEADER_IN = "Order Header
* CONVERT_PARVW_AUART = ' ' "Conversion of partner function + order type

IMPORTING
SALESDOCUMENT = "Sales and Distribution Document Number
SOLD_TO_PARTY = "Sold-to party
SHIP_TO_PARTY = "Ship-To Party
BILLING_PARTY = "Payer
RETURN = "Error Text

TABLES
ORDER_ITEMS_IN = "Item Data Input
* ORDER_CCARD = "Credit Card Data
* ORDER_CCARD_EX = "Credit card data output
* ORDER_SCHEDULE_EX = "Schedule line data output
* ORDER_CONDITION_EX = "Conditions Output
* ORDER_INCOMPLETE = "
* MESSAGETABLE = "Warning table (XVBFS)
* EXTENSIONIN = "Customer enhancment import
* PARTNERADDRESSES = "BAPI Reference Structure for Addresses (Org./Company)
ORDER_PARTNERS = "Partners
* ORDER_SCHEDULE_IN = "Schedule Line Data Input
* ORDER_ITEMS_OUT = "Item Data Output
* ORDER_CFGS_REF = "Configuration: Reference Data
* ORDER_CFGS_INST = "Configuration: Instances
* ORDER_CFGS_PART_OF = "Configuration: Part-of Specifications
* ORDER_CFGS_VALUE = "Configuration: Characteristic Values
* ORDER_CFGS_BLOB = "Internal configuration data (SCE)
.



IMPORTING Parameters details for BAPI_SALESORDER_SIMULATE

ORDER_HEADER_IN - Order Header

Data type: BAPISDHEAD
Optional: No
Call by Reference: No ( called with pass by value option)

CONVERT_PARVW_AUART - Conversion of partner function + order type

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

EXPORTING Parameters details for BAPI_SALESORDER_SIMULATE

SALESDOCUMENT - Sales and Distribution Document Number

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

SOLD_TO_PARTY - Sold-to party

Data type: BAPISOLDTO
Optional: No
Call by Reference: No ( called with pass by value option)

SHIP_TO_PARTY - Ship-To Party

Data type: BAPISHIPTO
Optional: No
Call by Reference: No ( called with pass by value option)

BILLING_PARTY - Payer

Data type: BAPIPAYER
Optional: No
Call by Reference: No ( called with pass by value option)

RETURN - Error Text

Data type: BAPIRETURN
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_SALESORDER_SIMULATE

ORDER_ITEMS_IN - Item Data Input

Data type: BAPIITEMIN
Optional: No
Call by Reference: No ( called with pass by value option)

ORDER_CCARD - Credit Card Data

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

ORDER_CCARD_EX - Credit card data output

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

ORDER_SCHEDULE_EX - Schedule line data output

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

ORDER_CONDITION_EX - Conditions Output

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

ORDER_INCOMPLETE -

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

MESSAGETABLE - Warning table (XVBFS)

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

EXTENSIONIN - Customer enhancment import

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

PARTNERADDRESSES - BAPI Reference Structure for Addresses (Org./Company)

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

ORDER_PARTNERS - Partners

Data type: BAPIPARTNR
Optional: No
Call by Reference: No ( called with pass by value option)

ORDER_SCHEDULE_IN - Schedule Line Data Input

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

ORDER_ITEMS_OUT - Item Data Output

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

ORDER_CFGS_REF - Configuration: Reference Data

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

ORDER_CFGS_INST - Configuration: Instances

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

ORDER_CFGS_PART_OF - Configuration: Part-of Specifications

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

ORDER_CFGS_VALUE - Configuration: Characteristic Values

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

ORDER_CFGS_BLOB - Internal configuration data (SCE)

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

Copy and paste ABAP code example for BAPI_SALESORDER_SIMULATE 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_salesdocument  TYPE BAPIVBELN-VBELN, "   
lt_order_items_in  TYPE STANDARD TABLE OF BAPIITEMIN, "   
lv_order_header_in  TYPE BAPISDHEAD, "   
lt_order_ccard  TYPE STANDARD TABLE OF BAPICCARD, "   
lt_order_ccard_ex  TYPE STANDARD TABLE OF BAPICCARD_EX, "   
lt_order_schedule_ex  TYPE STANDARD TABLE OF BAPISDHEDU, "   
lt_order_condition_ex  TYPE STANDARD TABLE OF BAPICOND, "   
lt_order_incomplete  TYPE STANDARD TABLE OF BAPIINCOMP, "   
lt_messagetable  TYPE STANDARD TABLE OF BAPIRET2, "   
lt_extensionin  TYPE STANDARD TABLE OF BAPIPAREX, "   
lt_partneraddresses  TYPE STANDARD TABLE OF BAPIADDR1, "   
lv_sold_to_party  TYPE BAPISOLDTO, "   
lt_order_partners  TYPE STANDARD TABLE OF BAPIPARTNR, "   
lv_convert_parvw_auart  TYPE BAPIFLAG-BAPIFLAG, "   SPACE
lv_ship_to_party  TYPE BAPISHIPTO, "   
lt_order_schedule_in  TYPE STANDARD TABLE OF BAPISCHDL, "   
lv_billing_party  TYPE BAPIPAYER, "   
lt_order_items_out  TYPE STANDARD TABLE OF BAPIITEMEX, "   
lv_return  TYPE BAPIRETURN, "   
lt_order_cfgs_ref  TYPE STANDARD TABLE OF BAPICUCFG, "   
lt_order_cfgs_inst  TYPE STANDARD TABLE OF BAPICUINS, "   
lt_order_cfgs_part_of  TYPE STANDARD TABLE OF BAPICUPRT, "   
lt_order_cfgs_value  TYPE STANDARD TABLE OF BAPICUVAL, "   
lt_order_cfgs_blob  TYPE STANDARD TABLE OF BAPICUBLB. "   

  CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'  "Sales Order: Simulate Sales Order
    EXPORTING
         ORDER_HEADER_IN = lv_order_header_in
         CONVERT_PARVW_AUART = lv_convert_parvw_auart
    IMPORTING
         SALESDOCUMENT = lv_salesdocument
         SOLD_TO_PARTY = lv_sold_to_party
         SHIP_TO_PARTY = lv_ship_to_party
         BILLING_PARTY = lv_billing_party
         RETURN = lv_return
    TABLES
         ORDER_ITEMS_IN = lt_order_items_in
         ORDER_CCARD = lt_order_ccard
         ORDER_CCARD_EX = lt_order_ccard_ex
         ORDER_SCHEDULE_EX = lt_order_schedule_ex
         ORDER_CONDITION_EX = lt_order_condition_ex
         ORDER_INCOMPLETE = lt_order_incomplete
         MESSAGETABLE = lt_messagetable
         EXTENSIONIN = lt_extensionin
         PARTNERADDRESSES = lt_partneraddresses
         ORDER_PARTNERS = lt_order_partners
         ORDER_SCHEDULE_IN = lt_order_schedule_in
         ORDER_ITEMS_OUT = lt_order_items_out
         ORDER_CFGS_REF = lt_order_cfgs_ref
         ORDER_CFGS_INST = lt_order_cfgs_inst
         ORDER_CFGS_PART_OF = lt_order_cfgs_part_of
         ORDER_CFGS_VALUE = lt_order_cfgs_value
         ORDER_CFGS_BLOB = lt_order_cfgs_blob
. " BAPI_SALESORDER_SIMULATE




ABAP code using 7.40 inline data declarations to call FM BAPI_SALESORDER_SIMULATE

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 VBELN FROM BAPIVBELN INTO @DATA(ld_salesdocument).
 
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single BAPIFLAG FROM BAPIFLAG INTO @DATA(ld_convert_parvw_auart).
DATA(ld_convert_parvw_auart) = ' '.
 
 
 
 
 
 
 
 
 
 
 


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!