SAP Function Modules

EC_PCA_SELECT_FROM_ARCHIVE SAP Function module







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

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


Pattern for FM EC_PCA_SELECT_FROM_ARCHIVE - EC PCA SELECT FROM ARCHIVE





CALL FUNCTION 'EC_PCA_SELECT_FROM_ARCHIVE' "
* EXPORTING
*   i_selections =              " rsds_frange_t
*   i_files_sequential_read =   " ecarc_t_file_key_range
*   i_field_catalogs =          " aind_tt_archindex
*   i_obligatory_fields =       " table
*   i_up_to_n_rows =            " sy-dbcnt
  IMPORTING
    e_glpca =                   " ecarc_t_glpca_curr
    e_glpcp =                   " ecarc_t_glpcp_curr
  EXCEPTIONS
    NO_INFOSTRUC_FOUND = 1      "
    PARAMETERS_INVALID = 2      "
    .  "  EC_PCA_SELECT_FROM_ARCHIVE

ABAP code example for Function Module EC_PCA_SELECT_FROM_ARCHIVE





The ABAP code below is a full code listing to execute function module EC_PCA_SELECT_FROM_ARCHIVE 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_e_glpca  TYPE ECARC_T_GLPCA_CURR ,
ld_e_glpcp  TYPE ECARC_T_GLPCP_CURR .

DATA(ld_i_selections) = 'Check type of data required'.
DATA(ld_i_files_sequential_read) = 'Check type of data required'.
DATA(ld_i_field_catalogs) = 'Check type of data required'.
DATA(ld_i_obligatory_fields) = 'Check type of data required'.
DATA(ld_i_up_to_n_rows) = '123 '. . CALL FUNCTION 'EC_PCA_SELECT_FROM_ARCHIVE' * EXPORTING * i_selections = ld_i_selections * i_files_sequential_read = ld_i_files_sequential_read * i_field_catalogs = ld_i_field_catalogs * i_obligatory_fields = ld_i_obligatory_fields * i_up_to_n_rows = ld_i_up_to_n_rows IMPORTING e_glpca = ld_e_glpca e_glpcp = ld_e_glpcp EXCEPTIONS NO_INFOSTRUC_FOUND = 1 PARAMETERS_INVALID = 2 . " EC_PCA_SELECT_FROM_ARCHIVE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "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_e_glpca  TYPE ECARC_T_GLPCA_CURR ,
ld_i_selections  TYPE RSDS_FRANGE_T ,
ld_e_glpcp  TYPE ECARC_T_GLPCP_CURR ,
ld_i_files_sequential_read  TYPE ECARC_T_FILE_KEY_RANGE ,
ld_i_field_catalogs  TYPE AIND_TT_ARCHINDEX ,
ld_i_obligatory_fields  TYPE TABLE ,
ld_i_up_to_n_rows  TYPE SY-DBCNT .

ld_i_selections = '123 '.
ld_i_files_sequential_read = '123 '.
ld_i_field_catalogs = '123 '.
ld_i_obligatory_fields = '123 '.
ld_i_up_to_n_rows = '123 '.

SAP Documentation for FM EC_PCA_SELECT_FROM_ARCHIVE


According to the selection criteria in I_SELECTIONS, the function module reads archived actual line items (table E_GLPCA) and/or plan ...See here for full SAP fm documentation


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