SAP BAPI_EXTORDER_CREATE Function Module for IS-H: BAPI ExternalOrder.CreateExternalOrder - Create External Order









BAPI_EXTORDER_CREATE is a standard bapi extorder create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for IS-H: BAPI ExternalOrder.CreateExternalOrder - Create External 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 extorder create FM, simply by entering the name BAPI_EXTORDER_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: 1312
Program Name: SAPL1312
Main Program: SAPL1312
Appliation area: N
Release date: 13-Jul-2007
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_EXTORDER_CREATE 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_EXTORDER_CREATE'"IS-H: BAPI ExternalOrder.CreateExternalOrder - Create External Order
EXPORTING
CLIENT = "Client
INSTITUTION = "Institution
EXTERNAL_ORDER_ID = "Case Number
EXTERNAL_ORDER = "IS-H: External Order
EXTERNAL_ORDERER = "IS-H: External Order Placer
* TESTRUN = ' ' "Test Mode (No Changes in Database)

IMPORTING
EXTERNAL_ORDER_CRE = "Created External Order Placer
WORST_RETURNED_MSGTY = "Most Severe Message Type

TABLES
* REMARK_INTERNAL = "Internal Comments
* REMARK_EXTERNAL = "External Comments
* RETURN = "Return Messages
.



IMPORTING Parameters details for BAPI_EXTORDER_CREATE

CLIENT - Client

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

INSTITUTION - Institution

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

EXTERNAL_ORDER_ID - Case Number

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

EXTERNAL_ORDER - IS-H: External Order

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

EXTERNAL_ORDERER - IS-H: External Order Placer

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

TESTRUN - Test Mode (No Changes in Database)

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

EXPORTING Parameters details for BAPI_EXTORDER_CREATE

EXTERNAL_ORDER_CRE - Created External Order Placer

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

WORST_RETURNED_MSGTY - Most Severe Message Type

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

TABLES Parameters details for BAPI_EXTORDER_CREATE

REMARK_INTERNAL - Internal Comments

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

REMARK_EXTERNAL - External Comments

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

RETURN - Return Messages

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

Copy and paste ABAP code example for BAPI_EXTORDER_CREATE 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_client  TYPE BAPINALL-CLIENT, "   
lt_remark_internal  TYPE STANDARD TABLE OF BAPI1312LTEXT, "   
lv_external_order_cre  TYPE BAPI1312NEO_NFAL, "   
lv_institution  TYPE BAPI1312NEO_NFAL-INSTITUTION, "   
lt_remark_external  TYPE STANDARD TABLE OF BAPI1312LTEXT, "   
lv_worst_returned_msgty  TYPE BAPINALL-WORSTRETMSG, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_external_order_id  TYPE BAPI1312NEO_NFAL-PATCASEID, "   
lv_external_order  TYPE BAPI1312NEO_NFAL, "   
lv_external_orderer  TYPE BAPI1309BPARTNER-BPARTNER, "   
lv_testrun  TYPE BAPINALL-TESTRUN. "   SPACE

  CALL FUNCTION 'BAPI_EXTORDER_CREATE'  "IS-H: BAPI ExternalOrder.CreateExternalOrder - Create External Order
    EXPORTING
         CLIENT = lv_client
         INSTITUTION = lv_institution
         EXTERNAL_ORDER_ID = lv_external_order_id
         EXTERNAL_ORDER = lv_external_order
         EXTERNAL_ORDERER = lv_external_orderer
         TESTRUN = lv_testrun
    IMPORTING
         EXTERNAL_ORDER_CRE = lv_external_order_cre
         WORST_RETURNED_MSGTY = lv_worst_returned_msgty
    TABLES
         REMARK_INTERNAL = lt_remark_internal
         REMARK_EXTERNAL = lt_remark_external
         RETURN = lt_return
. " BAPI_EXTORDER_CREATE




ABAP code using 7.40 inline data declarations to call FM BAPI_EXTORDER_CREATE

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 CLIENT FROM BAPINALL INTO @DATA(ld_client).
 
 
 
"SELECT single INSTITUTION FROM BAPI1312NEO_NFAL INTO @DATA(ld_institution).
 
 
"SELECT single WORSTRETMSG FROM BAPINALL INTO @DATA(ld_worst_returned_msgty).
 
 
"SELECT single PATCASEID FROM BAPI1312NEO_NFAL INTO @DATA(ld_external_order_id).
 
 
"SELECT single BPARTNER FROM BAPI1309BPARTNER INTO @DATA(ld_external_orderer).
 
"SELECT single TESTRUN FROM BAPINALL INTO @DATA(ld_testrun).
DATA(ld_testrun) = ' '.
 


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!