SAP Function Modules

NOR3_RESERVATION_CREATE SAP Function module - Create reservation







NOR3_RESERVATION_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 NOR3_RESERVATION_CREATE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM NOR3_RESERVATION_CREATE - NOR3 RESERVATION CREATE





CALL FUNCTION 'NOR3_RESERVATION_CREATE' "Create reservation
  EXPORTING
    reservation_header =        " bapirkpfc
*   logical_system =            " bbp_backend_dest-log_sys  Logical system
*   cuf_header =                " bbps_cuf_header  Customer Fields für Header
  IMPORTING
    reservation =               " bapirkpfc-res_no
  TABLES
    reservation_items =         " bapiresbc_eci  Übergabestruktur Anlegen - Reservierungsposition + ECI
*   return =                    " bapireturn
*   cuf_item =                  " bbps_cuf_item  Trägerstruktur für die Item-CustomerFields
*   cuf_acc =                   " bbps_cuf_acc  Customer Fields für Item
*   control_record =            " bbp_control_record  Customer Fields für Accounting
    .  "  NOR3_RESERVATION_CREATE

ABAP code example for Function Module NOR3_RESERVATION_CREATE





The ABAP code below is a full code listing to execute function module NOR3_RESERVATION_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_reservation  TYPE BAPIRKPFC-RES_NO ,
it_reservation_items  TYPE STANDARD TABLE OF BAPIRESBC_ECI,"TABLES PARAM
wa_reservation_items  LIKE LINE OF it_reservation_items ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_cuf_item  TYPE STANDARD TABLE OF BBPS_CUF_ITEM,"TABLES PARAM
wa_cuf_item  LIKE LINE OF it_cuf_item ,
it_cuf_acc  TYPE STANDARD TABLE OF BBPS_CUF_ACC,"TABLES PARAM
wa_cuf_acc  LIKE LINE OF it_cuf_acc ,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD,"TABLES PARAM
wa_control_record  LIKE LINE OF it_control_record .

DATA(ld_reservation_header) = 'Check type of data required'.

SELECT single LOG_SYS
FROM BBP_BACKEND_DEST
INTO @DATA(ld_logical_system).

DATA(ld_cuf_header) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_reservation_items to it_reservation_items.

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

"populate fields of struture and append to itab
append wa_cuf_item to it_cuf_item.

"populate fields of struture and append to itab
append wa_cuf_acc to it_cuf_acc.

"populate fields of struture and append to itab
append wa_control_record to it_control_record. . CALL FUNCTION 'NOR3_RESERVATION_CREATE' EXPORTING reservation_header = ld_reservation_header * logical_system = ld_logical_system * cuf_header = ld_cuf_header IMPORTING reservation = ld_reservation TABLES reservation_items = it_reservation_items * return = it_return * cuf_item = it_cuf_item * cuf_acc = it_cuf_acc * control_record = it_control_record . " NOR3_RESERVATION_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_reservation  TYPE BAPIRKPFC-RES_NO ,
ld_reservation_header  TYPE BAPIRKPFC ,
it_reservation_items  TYPE STANDARD TABLE OF BAPIRESBC_ECI ,
wa_reservation_items  LIKE LINE OF it_reservation_items,
ld_logical_system  TYPE BBP_BACKEND_DEST-LOG_SYS ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN ,
wa_return  LIKE LINE OF it_return,
ld_cuf_header  TYPE BBPS_CUF_HEADER ,
it_cuf_item  TYPE STANDARD TABLE OF BBPS_CUF_ITEM ,
wa_cuf_item  LIKE LINE OF it_cuf_item,
it_cuf_acc  TYPE STANDARD TABLE OF BBPS_CUF_ACC ,
wa_cuf_acc  LIKE LINE OF it_cuf_acc,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD ,
wa_control_record  LIKE LINE OF it_control_record.

ld_reservation_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_reservation_items to it_reservation_items.

SELECT single LOG_SYS
FROM BBP_BACKEND_DEST
INTO ld_logical_system.


"populate fields of struture and append to itab
append wa_return to it_return.
ld_cuf_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_cuf_item to it_cuf_item.

"populate fields of struture and append to itab
append wa_cuf_acc to it_cuf_acc.

"populate fields of struture and append to itab
append wa_control_record to it_control_record.

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 NOR3_RESERVATION_CREATE or its description.