SAP FCJ_GET_LATEST_ARCH Function Module for
FCJ_GET_LATEST_ARCH is a standard fcj get latest arch SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 fcj get latest arch FM, simply by entering the name FCJ_GET_LATEST_ARCH into the relevant SAP transaction such as SE37 or SE38.
Function Group: FCJ_BALANCE
Program Name: SAPLSAPLFCJ_BALANCE
Main Program: SAPLSAPLFCJ_BALANCE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FCJ_GET_LATEST_ARCH 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 'FCJ_GET_LATEST_ARCH'".
EXPORTING
I_COMP_CODE = "
I_CAJO_NUMBER = "
I_BALANCE_DATE = "
IMPORTING
E_LAST_ARCH_DATE = "
E_LAST_ARCH_CURRENCY = "
E_LAST_ARCH_SUM = "
E_LAST_ARCH_ACCOUNTANT = "
E_SARCH = "
EXCEPTIONS
NO_ARCH_DATA = 1
IMPORTING Parameters details for FCJ_GET_LATEST_ARCH
I_COMP_CODE -
Data type: TCJ_BALANCE-COMP_CODEOptional: No
Call by Reference: Yes
I_CAJO_NUMBER -
Data type: TCJ_BALANCE-CAJO_NUMBEROptional: No
Call by Reference: Yes
I_BALANCE_DATE -
Data type: SY-DATUMOptional: No
Call by Reference: Yes
EXPORTING Parameters details for FCJ_GET_LATEST_ARCH
E_LAST_ARCH_DATE -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_LAST_ARCH_CURRENCY -
Data type: TCJ_BALANCE-CURRENCYOptional: No
Call by Reference: No ( called with pass by value option)
E_LAST_ARCH_SUM -
Data type: TCJ_BALANCE-CLOSING_SUMOptional: No
Call by Reference: No ( called with pass by value option)
E_LAST_ARCH_ACCOUNTANT -
Data type: TCJ_BALANCE-ACCOUNTANTOptional: No
Call by Reference: No ( called with pass by value option)
E_SARCH -
Data type: TCJ_BALANCE-SARCHOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ARCH_DATA -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FCJ_GET_LATEST_ARCH 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_i_comp_code | TYPE TCJ_BALANCE-COMP_CODE, " | |||
| lv_no_arch_data | TYPE TCJ_BALANCE, " | |||
| lv_e_last_arch_date | TYPE SY-DATUM, " | |||
| lv_i_cajo_number | TYPE TCJ_BALANCE-CAJO_NUMBER, " | |||
| lv_e_last_arch_currency | TYPE TCJ_BALANCE-CURRENCY, " | |||
| lv_i_balance_date | TYPE SY-DATUM, " | |||
| lv_e_last_arch_sum | TYPE TCJ_BALANCE-CLOSING_SUM, " | |||
| lv_e_last_arch_accountant | TYPE TCJ_BALANCE-ACCOUNTANT, " | |||
| lv_e_sarch | TYPE TCJ_BALANCE-SARCH. " |
|   CALL FUNCTION 'FCJ_GET_LATEST_ARCH' " |
| EXPORTING | ||
| I_COMP_CODE | = lv_i_comp_code | |
| I_CAJO_NUMBER | = lv_i_cajo_number | |
| I_BALANCE_DATE | = lv_i_balance_date | |
| IMPORTING | ||
| E_LAST_ARCH_DATE | = lv_e_last_arch_date | |
| E_LAST_ARCH_CURRENCY | = lv_e_last_arch_currency | |
| E_LAST_ARCH_SUM | = lv_e_last_arch_sum | |
| E_LAST_ARCH_ACCOUNTANT | = lv_e_last_arch_accountant | |
| E_SARCH | = lv_e_sarch | |
| EXCEPTIONS | ||
| NO_ARCH_DATA = 1 | ||
| . " FCJ_GET_LATEST_ARCH | ||
ABAP code using 7.40 inline data declarations to call FM FCJ_GET_LATEST_ARCH
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 COMP_CODE FROM TCJ_BALANCE INTO @DATA(ld_i_comp_code). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_e_last_arch_date). | ||||
| "SELECT single CAJO_NUMBER FROM TCJ_BALANCE INTO @DATA(ld_i_cajo_number). | ||||
| "SELECT single CURRENCY FROM TCJ_BALANCE INTO @DATA(ld_e_last_arch_currency). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_balance_date). | ||||
| "SELECT single CLOSING_SUM FROM TCJ_BALANCE INTO @DATA(ld_e_last_arch_sum). | ||||
| "SELECT single ACCOUNTANT FROM TCJ_BALANCE INTO @DATA(ld_e_last_arch_accountant). | ||||
| "SELECT single SARCH FROM TCJ_BALANCE INTO @DATA(ld_e_sarch). | ||||
Search for further information about these or an SAP related objects