SAP Function Modules

PAMS_ORDER_CREATE SAP Function module







PAMS_ORDER_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name PAMS_ORDER_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PAMS_ORDER
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PAMS_ORDER_CREATE - PAMS ORDER CREATE





CALL FUNCTION 'PAMS_ORDER_CREATE' "
  EXPORTING
    order_header =              " bapi_alm_order_headers_i  Order Header
*   order_header_srv =          " bapi_alm_order_srvdat_e  ALM Order BAPIs: Service-Specific Data, External Structure
*   ind_status_rlsd_set =       " flag
*   ind_status_teco_set =       " flag
*   ind_commit = 'X'            " flag          Save in Database
  IMPORTING
    ef_orderid =                " aufnr         Order Number
* TABLES
*   order_srule =               " bapi_alm_order_srule  Input Structure for PM/CS BAPIs Settlement Rule
*   order_operation =           " bapi_alm_order_operation  Order Operations
*   order_component =           " bapi_alm_order_component  Order Components
*   order_objectlist =          " bapi_alm_order_objectlist  Object List
*   order_olist_relation =      " bapi_alm_olist_relation  AVO Link to Object List Entry
*   order_ltext_key =           " bapi_alm_text  Text Header for ALM Order BAPIs
*   order_ltext_lines =         " bapi_alm_text_lines  Text Lines for ALM BAPIs
*   extension_in =              " bapiparex     Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
*   objectlist_no_e =           " bapi_alm_order_olist_e
*   olist_relation_no_e =       " bapi_alm_order_relation_export
*   return =                    " bapiret2      Return Parameter(s)
    .  "  PAMS_ORDER_CREATE

ABAP code example for Function Module PAMS_ORDER_CREATE





The ABAP code below is a full code listing to execute function module PAMS_ORDER_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_ef_orderid  TYPE AUFNR ,
it_order_srule  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_SRULE,"TABLES PARAM
wa_order_srule  LIKE LINE OF it_order_srule ,
it_order_operation  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OPERATION,"TABLES PARAM
wa_order_operation  LIKE LINE OF it_order_operation ,
it_order_component  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_COMPONENT,"TABLES PARAM
wa_order_component  LIKE LINE OF it_order_component ,
it_order_objectlist  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OBJECTLIST,"TABLES PARAM
wa_order_objectlist  LIKE LINE OF it_order_objectlist ,
it_order_olist_relation  TYPE STANDARD TABLE OF BAPI_ALM_OLIST_RELATION,"TABLES PARAM
wa_order_olist_relation  LIKE LINE OF it_order_olist_relation ,
it_order_ltext_key  TYPE STANDARD TABLE OF BAPI_ALM_TEXT,"TABLES PARAM
wa_order_ltext_key  LIKE LINE OF it_order_ltext_key ,
it_order_ltext_lines  TYPE STANDARD TABLE OF BAPI_ALM_TEXT_LINES,"TABLES PARAM
wa_order_ltext_lines  LIKE LINE OF it_order_ltext_lines ,
it_extension_in  TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM
wa_extension_in  LIKE LINE OF it_extension_in ,
it_objectlist_no_e  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OLIST_E,"TABLES PARAM
wa_objectlist_no_e  LIKE LINE OF it_objectlist_no_e ,
it_olist_relation_no_e  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_RELATION_EXPORT,"TABLES PARAM
wa_olist_relation_no_e  LIKE LINE OF it_olist_relation_no_e ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .

DATA(ld_order_header) = 'Check type of data required'.
DATA(ld_order_header_srv) = 'Check type of data required'.
DATA(ld_ind_status_rlsd_set) = 'Check type of data required'.
DATA(ld_ind_status_teco_set) = 'Check type of data required'.
DATA(ld_ind_commit) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_srule to it_order_srule.

"populate fields of struture and append to itab
append wa_order_operation to it_order_operation.

"populate fields of struture and append to itab
append wa_order_component to it_order_component.

"populate fields of struture and append to itab
append wa_order_objectlist to it_order_objectlist.

"populate fields of struture and append to itab
append wa_order_olist_relation to it_order_olist_relation.

"populate fields of struture and append to itab
append wa_order_ltext_key to it_order_ltext_key.

"populate fields of struture and append to itab
append wa_order_ltext_lines to it_order_ltext_lines.

"populate fields of struture and append to itab
append wa_extension_in to it_extension_in.

"populate fields of struture and append to itab
append wa_objectlist_no_e to it_objectlist_no_e.

"populate fields of struture and append to itab
append wa_olist_relation_no_e to it_olist_relation_no_e.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'PAMS_ORDER_CREATE' EXPORTING order_header = ld_order_header * order_header_srv = ld_order_header_srv * ind_status_rlsd_set = ld_ind_status_rlsd_set * ind_status_teco_set = ld_ind_status_teco_set * ind_commit = ld_ind_commit IMPORTING ef_orderid = ld_ef_orderid * TABLES * order_srule = it_order_srule * order_operation = it_order_operation * order_component = it_order_component * order_objectlist = it_order_objectlist * order_olist_relation = it_order_olist_relation * order_ltext_key = it_order_ltext_key * order_ltext_lines = it_order_ltext_lines * extension_in = it_extension_in * objectlist_no_e = it_objectlist_no_e * olist_relation_no_e = it_olist_relation_no_e * return = it_return . " PAMS_ORDER_CREATE
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_ef_orderid  TYPE AUFNR ,
ld_order_header  TYPE BAPI_ALM_ORDER_HEADERS_I ,
it_order_srule  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_SRULE ,
wa_order_srule  LIKE LINE OF it_order_srule,
ld_order_header_srv  TYPE BAPI_ALM_ORDER_SRVDAT_E ,
it_order_operation  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OPERATION ,
wa_order_operation  LIKE LINE OF it_order_operation,
ld_ind_status_rlsd_set  TYPE FLAG ,
it_order_component  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_COMPONENT ,
wa_order_component  LIKE LINE OF it_order_component,
ld_ind_status_teco_set  TYPE FLAG ,
it_order_objectlist  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OBJECTLIST ,
wa_order_objectlist  LIKE LINE OF it_order_objectlist,
ld_ind_commit  TYPE FLAG ,
it_order_olist_relation  TYPE STANDARD TABLE OF BAPI_ALM_OLIST_RELATION ,
wa_order_olist_relation  LIKE LINE OF it_order_olist_relation,
it_order_ltext_key  TYPE STANDARD TABLE OF BAPI_ALM_TEXT ,
wa_order_ltext_key  LIKE LINE OF it_order_ltext_key,
it_order_ltext_lines  TYPE STANDARD TABLE OF BAPI_ALM_TEXT_LINES ,
wa_order_ltext_lines  LIKE LINE OF it_order_ltext_lines,
it_extension_in  TYPE STANDARD TABLE OF BAPIPAREX ,
wa_extension_in  LIKE LINE OF it_extension_in,
it_objectlist_no_e  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_OLIST_E ,
wa_objectlist_no_e  LIKE LINE OF it_objectlist_no_e,
it_olist_relation_no_e  TYPE STANDARD TABLE OF BAPI_ALM_ORDER_RELATION_EXPORT ,
wa_olist_relation_no_e  LIKE LINE OF it_olist_relation_no_e,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.

ld_order_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_srule to it_order_srule.
ld_order_header_srv = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_operation to it_order_operation.
ld_ind_status_rlsd_set = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_component to it_order_component.
ld_ind_status_teco_set = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_objectlist to it_order_objectlist.
ld_ind_commit = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_olist_relation to it_order_olist_relation.

"populate fields of struture and append to itab
append wa_order_ltext_key to it_order_ltext_key.

"populate fields of struture and append to itab
append wa_order_ltext_lines to it_order_ltext_lines.

"populate fields of struture and append to itab
append wa_extension_in to it_extension_in.

"populate fields of struture and append to itab
append wa_objectlist_no_e to it_objectlist_no_e.

"populate fields of struture and append to itab
append wa_olist_relation_no_e to it_olist_relation_no_e.

"populate fields of struture and append to itab
append wa_return to it_return.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name PAMS_ORDER_CREATE or its description.