SAP FKK_AR_PROGRAM_OPEN Function Module for Generic controls for Argentina Legal Reports
FKK_AR_PROGRAM_OPEN is a standard fkk ar program open SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generic controls for Argentina Legal Reports processing and below is the pattern details for this FM, 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 fkk ar program open FM, simply by entering the name FKK_AR_PROGRAM_OPEN into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKAR_LEGAL_REPORTS
Program Name: SAPLFKAR_LEGAL_REPORTS
Main Program: SAPLFKAR_LEGAL_REPORTS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_AR_PROGRAM_OPEN 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 'FKK_AR_PROGRAM_OPEN'"Generic controls for Argentina Legal Reports.
EXPORTING
* I_FILE = "Physical file name
I_BUKRS = "Company code
I_FROMDATE = "ARGENTINA: Legal report tax reported from date
I_TODATE = "ARGENTINA: Legal report tax reported up to date
I_REPORT_TYPE = "Report type
* I_FREGIO = "Flag for Information at Province level
* I_FCOUNC = "Flag for Information at Municipe level
IMPORTING
E_DFKKARREPCONTST = "ARGENTINA: Legal report sales tax parameters
CHANGING
I_TEST = "Test run only flag
TABLES
* T_J_1ATAXID = "KTOSL
* T_REGIO = "ARGENTINA: Legal reporting interface structure for function
* T_COUNC = "ARGENTINA: Legal reporting interface structure for function
EXCEPTIONS
NO_AUTHOR_WRITE_FILE = 1 NO_AUTHOR_READ_FILE = 2 INVALID_FROMDATE = 3 INVALID_PERIOD = 4 ERROR_OPEN_FILE = 5 EARSORT_NOT_FOUND = 6
IMPORTING Parameters details for FKK_AR_PROGRAM_OPEN
I_FILE - Physical file name
Data type: AUTHB-FILENAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_FROMDATE - ARGENTINA: Legal report tax reported from date
Data type: DFKKARREPCONTST-EARUPTODATEOptional: No
Call by Reference: No ( called with pass by value option)
I_TODATE - ARGENTINA: Legal report tax reported up to date
Data type: DFKKARREPCONTST-EARUPTODATEOptional: No
Call by Reference: No ( called with pass by value option)
I_REPORT_TYPE - Report type
Data type: CHAR2Optional: No
Call by Reference: No ( called with pass by value option)
I_FREGIO - Flag for Information at Province level
Data type: CHAR1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FCOUNC - Flag for Information at Municipe level
Data type: CHAR1Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKK_AR_PROGRAM_OPEN
E_DFKKARREPCONTST - ARGENTINA: Legal report sales tax parameters
Data type: DFKKARREPCONTSTOptional: No
Call by Reference: Yes
CHANGING Parameters details for FKK_AR_PROGRAM_OPEN
I_TEST - Test run only flag
Data type: CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FKK_AR_PROGRAM_OPEN
T_J_1ATAXID - KTOSL
Data type: FKKAR_KTOSLOptional: Yes
Call by Reference: Yes
T_REGIO - ARGENTINA: Legal reporting interface structure for function
Data type: FKKAR_REGIOOptional: Yes
Call by Reference: Yes
T_COUNC - ARGENTINA: Legal reporting interface structure for function
Data type: FKKAR_COUNCOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_AUTHOR_WRITE_FILE - No authorization for writing to file I_FILE.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHOR_READ_FILE - No authorization for reading file I_FILE.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_FROMDATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_PERIOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_OPEN_FILE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EARSORT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FKK_AR_PROGRAM_OPEN 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_file | TYPE AUTHB-FILENAME, " | |||
| lv_i_test | TYPE CHAR1, " | |||
| lt_t_j_1ataxid | TYPE STANDARD TABLE OF FKKAR_KTOSL, " | |||
| lv_e_dfkkarrepcontst | TYPE DFKKARREPCONTST, " | |||
| lv_no_author_write_file | TYPE DFKKARREPCONTST, " | |||
| lv_i_bukrs | TYPE T001-BUKRS, " | |||
| lt_t_regio | TYPE STANDARD TABLE OF FKKAR_REGIO, " | |||
| lv_no_author_read_file | TYPE FKKAR_REGIO, " | |||
| lt_t_counc | TYPE STANDARD TABLE OF FKKAR_COUNC, " | |||
| lv_i_fromdate | TYPE DFKKARREPCONTST-EARUPTODATE, " | |||
| lv_invalid_fromdate | TYPE DFKKARREPCONTST, " | |||
| lv_i_todate | TYPE DFKKARREPCONTST-EARUPTODATE, " | |||
| lv_invalid_period | TYPE DFKKARREPCONTST, " | |||
| lv_i_report_type | TYPE CHAR2, " | |||
| lv_error_open_file | TYPE CHAR2, " | |||
| lv_i_fregio | TYPE CHAR1, " | |||
| lv_earsort_not_found | TYPE CHAR1, " | |||
| lv_i_fcounc | TYPE CHAR1. " |
|   CALL FUNCTION 'FKK_AR_PROGRAM_OPEN' "Generic controls for Argentina Legal Reports |
| EXPORTING | ||
| I_FILE | = lv_i_file | |
| I_BUKRS | = lv_i_bukrs | |
| I_FROMDATE | = lv_i_fromdate | |
| I_TODATE | = lv_i_todate | |
| I_REPORT_TYPE | = lv_i_report_type | |
| I_FREGIO | = lv_i_fregio | |
| I_FCOUNC | = lv_i_fcounc | |
| IMPORTING | ||
| E_DFKKARREPCONTST | = lv_e_dfkkarrepcontst | |
| CHANGING | ||
| I_TEST | = lv_i_test | |
| TABLES | ||
| T_J_1ATAXID | = lt_t_j_1ataxid | |
| T_REGIO | = lt_t_regio | |
| T_COUNC | = lt_t_counc | |
| EXCEPTIONS | ||
| NO_AUTHOR_WRITE_FILE = 1 | ||
| NO_AUTHOR_READ_FILE = 2 | ||
| INVALID_FROMDATE = 3 | ||
| INVALID_PERIOD = 4 | ||
| ERROR_OPEN_FILE = 5 | ||
| EARSORT_NOT_FOUND = 6 | ||
| . " FKK_AR_PROGRAM_OPEN | ||
ABAP code using 7.40 inline data declarations to call FM FKK_AR_PROGRAM_OPEN
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 FILENAME FROM AUTHB INTO @DATA(ld_i_file). | ||||
| "SELECT single BUKRS FROM T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single EARUPTODATE FROM DFKKARREPCONTST INTO @DATA(ld_i_fromdate). | ||||
| "SELECT single EARUPTODATE FROM DFKKARREPCONTST INTO @DATA(ld_i_todate). | ||||
Search for further information about these or an SAP related objects