SAP Function Modules

P_ORDER_ARCHIVE_ENTRY SAP Function module







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

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


Pattern for FM P_ORDER_ARCHIVE_ENTRY - P ORDER ARCHIVE ENTRY





CALL FUNCTION 'P_ORDER_ARCHIVE_ENTRY' "
  EXPORTING
    order_type =                " aufk-autyp
    test_arc =                  " rc27x-flg_sel
    delete =                    " rc27x-flg_sel
    notice =                    " admi_run-comments
    archive_object =            " arch_obj-object
*   order_package_size = 10     " coarch-dbnum
*   create_new_file = 'X'       " rc27x-flg_sel
*   objects_to_delete =         " tca11
*   i_ar_ilm =                  " ilm_write_arch
*   i_snap =                    " ilm_write_snap
*   i_dest =                    " ilm_write_dest
  TABLES
    orders =                    " ord_pre
*   errors =                    " coactmsg
  EXCEPTIONS
    ARCHIVING_ERROR = 1         "
    .  "  P_ORDER_ARCHIVE_ENTRY

ABAP code example for Function Module P_ORDER_ARCHIVE_ENTRY





The ABAP code below is a full code listing to execute function module P_ORDER_ARCHIVE_ENTRY 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:
it_orders  TYPE STANDARD TABLE OF ORD_PRE,"TABLES PARAM
wa_orders  LIKE LINE OF it_orders ,
it_errors  TYPE STANDARD TABLE OF COACTMSG,"TABLES PARAM
wa_errors  LIKE LINE OF it_errors .


SELECT single AUTYP
FROM AUFK
INTO @DATA(ld_order_type).


DATA(ld_test_arc) = some text here

DATA(ld_delete) = some text here

SELECT single COMMENTS
FROM ADMI_RUN
INTO @DATA(ld_notice).


SELECT single OBJECT
FROM ARCH_OBJ
INTO @DATA(ld_archive_object).


DATA(ld_order_package_size) = 123

DATA(ld_create_new_file) = some text here
DATA(ld_objects_to_delete) = 'Check type of data required'.
DATA(ld_i_ar_ilm) = 'Check type of data required'.
DATA(ld_i_snap) = 'Check type of data required'.
DATA(ld_i_dest) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_orders to it_orders.

"populate fields of struture and append to itab
append wa_errors to it_errors. . CALL FUNCTION 'P_ORDER_ARCHIVE_ENTRY' EXPORTING order_type = ld_order_type test_arc = ld_test_arc delete = ld_delete notice = ld_notice archive_object = ld_archive_object * order_package_size = ld_order_package_size * create_new_file = ld_create_new_file * objects_to_delete = ld_objects_to_delete * i_ar_ilm = ld_i_ar_ilm * i_snap = ld_i_snap * i_dest = ld_i_dest TABLES orders = it_orders * errors = it_errors EXCEPTIONS ARCHIVING_ERROR = 1 . " P_ORDER_ARCHIVE_ENTRY
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_order_type  TYPE AUFK-AUTYP ,
it_orders  TYPE STANDARD TABLE OF ORD_PRE ,
wa_orders  LIKE LINE OF it_orders,
ld_test_arc  TYPE RC27X-FLG_SEL ,
it_errors  TYPE STANDARD TABLE OF COACTMSG ,
wa_errors  LIKE LINE OF it_errors,
ld_delete  TYPE RC27X-FLG_SEL ,
ld_notice  TYPE ADMI_RUN-COMMENTS ,
ld_archive_object  TYPE ARCH_OBJ-OBJECT ,
ld_order_package_size  TYPE COARCH-DBNUM ,
ld_create_new_file  TYPE RC27X-FLG_SEL ,
ld_objects_to_delete  TYPE TCA11 ,
ld_i_ar_ilm  TYPE ILM_WRITE_ARCH ,
ld_i_snap  TYPE ILM_WRITE_SNAP ,
ld_i_dest  TYPE ILM_WRITE_DEST .


SELECT single AUTYP
FROM AUFK
INTO ld_order_type.


"populate fields of struture and append to itab
append wa_orders to it_orders.

ld_test_arc = some text here

"populate fields of struture and append to itab
append wa_errors to it_errors.

ld_delete = some text here

SELECT single COMMENTS
FROM ADMI_RUN
INTO ld_notice.


SELECT single OBJECT
FROM ARCH_OBJ
INTO ld_archive_object.


ld_order_package_size = 123

ld_create_new_file = some text here
ld_objects_to_delete = 'Check type of data required'.
ld_i_ar_ilm = 'Check type of data required'.
ld_i_snap = 'Check type of data required'.
ld_i_dest = 'Check type of data required'.

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