SAP FKK_SAMPLE_1321 Function Module for
FKK_SAMPLE_1321 is a standard fkk sample 1321 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 fkk sample 1321 FM, simply by entering the name FKK_SAMPLE_1321 into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKA5
Program Name: SAPLFKA5
Main Program: SAPLFKA5
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_SAMPLE_1321 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_SAMPLE_1321'".
EXPORTING
I_APPLK = "Application Area
I_SPRAS = "Language
* I_BUKRS = "Company Code
* I_SPART = "Division
I_HVORG = "Main Transaction
* I_TVORG = "Subtransaction
* I_NOT_TE305T_READ = 'X' "Do Not Get Text From TE305T
* I_XZAHL = ' ' "
* I_AUGRD = ' ' "Clearing Reason
IMPORTING
E_HTEXT = "Main Transaction Text
E_VTEXT = "Sub-Transaction Text
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for FKK_SAMPLE_1321
I_APPLK - Application Area
Data type: FKKOP-APPLKOptional: No
Call by Reference: No ( called with pass by value option)
I_SPRAS - Language
Data type: SY-LANGUOptional: No
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company Code
Data type: FKKOP-BUKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SPART - Division
Data type: FKKOP-SPARTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_HVORG - Main Transaction
Data type: FKKOP-HVORGOptional: No
Call by Reference: No ( called with pass by value option)
I_TVORG - Subtransaction
Data type: FKKOP-TVORGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NOT_TE305T_READ - Do Not Get Text From TE305T
Data type: BOOLE-BOOLEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_XZAHL -
Data type: XFELDDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_AUGRD - Clearing Reason
Data type: AUGRD_KKDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for FKK_SAMPLE_1321
E_HTEXT - Main Transaction Text
Data type: TFKHVOT-TXT30Optional: No
Call by Reference: No ( called with pass by value option)
E_VTEXT - Sub-Transaction Text
Data type: TFKTVOT-TXT30Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - Entry Not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FKK_SAMPLE_1321 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_e_htext | TYPE TFKHVOT-TXT30, " | |||
| lv_i_applk | TYPE FKKOP-APPLK, " | |||
| lv_not_found | TYPE FKKOP, " | |||
| lv_e_vtext | TYPE TFKTVOT-TXT30, " | |||
| lv_i_spras | TYPE SY-LANGU, " | |||
| lv_i_bukrs | TYPE FKKOP-BUKRS, " | |||
| lv_i_spart | TYPE FKKOP-SPART, " | |||
| lv_i_hvorg | TYPE FKKOP-HVORG, " | |||
| lv_i_tvorg | TYPE FKKOP-TVORG, " | |||
| lv_i_not_te305t_read | TYPE BOOLE-BOOLE, " 'X' | |||
| lv_i_xzahl | TYPE XFELD, " ' ' | |||
| lv_i_augrd | TYPE AUGRD_KK. " ' ' |
|   CALL FUNCTION 'FKK_SAMPLE_1321' " |
| EXPORTING | ||
| I_APPLK | = lv_i_applk | |
| I_SPRAS | = lv_i_spras | |
| I_BUKRS | = lv_i_bukrs | |
| I_SPART | = lv_i_spart | |
| I_HVORG | = lv_i_hvorg | |
| I_TVORG | = lv_i_tvorg | |
| I_NOT_TE305T_READ | = lv_i_not_te305t_read | |
| I_XZAHL | = lv_i_xzahl | |
| I_AUGRD | = lv_i_augrd | |
| IMPORTING | ||
| E_HTEXT | = lv_e_htext | |
| E_VTEXT | = lv_e_vtext | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " FKK_SAMPLE_1321 | ||
ABAP code using 7.40 inline data declarations to call FM FKK_SAMPLE_1321
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 TXT30 FROM TFKHVOT INTO @DATA(ld_e_htext). | ||||
| "SELECT single APPLK FROM FKKOP INTO @DATA(ld_i_applk). | ||||
| "SELECT single TXT30 FROM TFKTVOT INTO @DATA(ld_e_vtext). | ||||
| "SELECT single LANGU FROM SY INTO @DATA(ld_i_spras). | ||||
| "SELECT single BUKRS FROM FKKOP INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single SPART FROM FKKOP INTO @DATA(ld_i_spart). | ||||
| "SELECT single HVORG FROM FKKOP INTO @DATA(ld_i_hvorg). | ||||
| "SELECT single TVORG FROM FKKOP INTO @DATA(ld_i_tvorg). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_not_te305t_read). | ||||
| DATA(ld_i_not_te305t_read) | = 'X'. | |||
| DATA(ld_i_xzahl) | = ' '. | |||
| DATA(ld_i_augrd) | = ' '. | |||
Search for further information about these or an SAP related objects