SAP AISCO_CALCULATE_FIRST_DAY Function Module for
AISCO_CALCULATE_FIRST_DAY is a standard aisco calculate first day 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 aisco calculate first day FM, simply by entering the name AISCO_CALCULATE_FIRST_DAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: AISCO
Program Name: SAPLAISCO
Main Program: SAPLAISCO
Appliation area: A
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function AISCO_CALCULATE_FIRST_DAY 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 'AISCO_CALCULATE_FIRST_DAY'".
EXPORTING
I_BUKRS = "Company Code
* I_CHECK_MANY_OPEN_FYS = ' ' "
IMPORTING
E_FIRST_DAY = "
E_TO_YEAR = "
E_DURING_FY = "
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 1 CANNOT_DETERMINE_TAKEOVER_YEAR = 2 CANNOT_DETERMINE_FIRST_DAY = 3 CANNOT_DETERMINE_LAST_DAY = 4 MANY_OPEN_FYS = 5
IMPORTING Parameters details for AISCO_CALCULATE_FIRST_DAY
I_BUKRS - Company Code
Data type: BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_CHECK_MANY_OPEN_FYS -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for AISCO_CALCULATE_FIRST_DAY
E_FIRST_DAY -
Data type: T093C-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_TO_YEAR -
Data type: ANLC-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
E_DURING_FY -
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
COMPANY_CODE_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANNOT_DETERMINE_TAKEOVER_YEAR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANNOT_DETERMINE_FIRST_DAY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANNOT_DETERMINE_LAST_DAY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MANY_OPEN_FYS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for AISCO_CALCULATE_FIRST_DAY 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_bukrs | TYPE BUKRS, " | |||
| lv_e_first_day | TYPE T093C-DATUM, " | |||
| lv_company_code_not_found | TYPE T093C, " | |||
| lv_e_to_year | TYPE ANLC-GJAHR, " | |||
| lv_i_check_many_open_fys | TYPE ANLC, " SPACE | |||
| lv_cannot_determine_takeover_year | TYPE ANLC, " | |||
| lv_e_during_fy | TYPE XFELD, " | |||
| lv_cannot_determine_first_day | TYPE XFELD, " | |||
| lv_cannot_determine_last_day | TYPE XFELD, " | |||
| lv_many_open_fys | TYPE XFELD. " |
|   CALL FUNCTION 'AISCO_CALCULATE_FIRST_DAY' " |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_CHECK_MANY_OPEN_FYS | = lv_i_check_many_open_fys | |
| IMPORTING | ||
| E_FIRST_DAY | = lv_e_first_day | |
| E_TO_YEAR | = lv_e_to_year | |
| E_DURING_FY | = lv_e_during_fy | |
| EXCEPTIONS | ||
| COMPANY_CODE_NOT_FOUND = 1 | ||
| CANNOT_DETERMINE_TAKEOVER_YEAR = 2 | ||
| CANNOT_DETERMINE_FIRST_DAY = 3 | ||
| CANNOT_DETERMINE_LAST_DAY = 4 | ||
| MANY_OPEN_FYS = 5 | ||
| . " AISCO_CALCULATE_FIRST_DAY | ||
ABAP code using 7.40 inline data declarations to call FM AISCO_CALCULATE_FIRST_DAY
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 DATUM FROM T093C INTO @DATA(ld_e_first_day). | ||||
| "SELECT single GJAHR FROM ANLC INTO @DATA(ld_e_to_year). | ||||
| DATA(ld_i_check_many_open_fys) | = ' '. | |||
Search for further information about these or an SAP related objects