SAP FKK_PT_GET_PACKAGE_OF_SEQUENCE Function Module for Fetchs a data package from a sequence (DB cursor)
FKK_PT_GET_PACKAGE_OF_SEQUENCE is a standard fkk pt get package of sequence SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Fetchs a data package from a sequence (DB cursor) 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 pt get package of sequence FM, simply by entering the name FKK_PT_GET_PACKAGE_OF_SEQUENCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FKPT_DS_UTILITY
Program Name: SAPLFKPT_DS_UTILITY
Main Program: SAPLFKPT_DS_UTILITY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FKK_PT_GET_PACKAGE_OF_SEQUENCE 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_PT_GET_PACKAGE_OF_SEQUENCE'"Fetchs a data package from a sequence (DB cursor).
EXPORTING
IR_SEQUENCE_CURSOR = "
IV_CURSOR_COUNTER = "
IV_PACKAGE_COUNTER = "
IV_PACKAGE_SIZE = "
IT_LEFT_DATA_FROM_PRE_FETCH = "Table Type: Encryption of Official Document Numbers
* IF_BATCH = "General Indicator
* IF_PRINT = "General Indicator
* IS_EXIT_DOC = "Encryption of Official Document Numbers
IMPORTING
ET_PACKAGE_TO_HANDLE = "Table Type: Encryption of Official Document Numbers
ET_DATA_FOR_NEXT_PACKAGE = "Table Type: Encryption of Official Document Numbers
ES_PREREQUISITE_DATA_NEXT = "Official Document Number with Attributes
EF_EXIT_DOC_PROCESSED = "General Indicator
EF_ALL_DOC_PROCESSED = "General Indicator
EXCEPTIONS
ERROR = 1 CURSOR_NOT_OPEN = 2 NO_DATA = 3 INCOMPLETE_PACKAGE = 4 LAST_PACKAGE = 5
IMPORTING Parameters details for FKK_PT_GET_PACKAGE_OF_SEQUENCE
IR_SEQUENCE_CURSOR -
Data type: CURSOROptional: No
Call by Reference: Yes
IV_CURSOR_COUNTER -
Data type: IOptional: No
Call by Reference: Yes
IV_PACKAGE_COUNTER -
Data type: IOptional: No
Call by Reference: Yes
IV_PACKAGE_SIZE -
Data type: IOptional: No
Call by Reference: Yes
IT_LEFT_DATA_FROM_PRE_FETCH - Table Type: Encryption of Official Document Numbers
Data type: DFKKEXTDOC2_TABOptional: No
Call by Reference: Yes
IF_BATCH - General Indicator
Data type: GENERAL_FLAGOptional: Yes
Call by Reference: Yes
IF_PRINT - General Indicator
Data type: GENERAL_FLAGOptional: Yes
Call by Reference: Yes
IS_EXIT_DOC - Encryption of Official Document Numbers
Data type: DFKKEXTDOC2Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for FKK_PT_GET_PACKAGE_OF_SEQUENCE
ET_PACKAGE_TO_HANDLE - Table Type: Encryption of Official Document Numbers
Data type: DFKKEXTDOC2_TABOptional: No
Call by Reference: Yes
ET_DATA_FOR_NEXT_PACKAGE - Table Type: Encryption of Official Document Numbers
Data type: DFKKEXTDOC2_TABOptional: No
Call by Reference: Yes
ES_PREREQUISITE_DATA_NEXT - Official Document Number with Attributes
Data type: DFKKEXTDOC2Optional: No
Call by Reference: Yes
EF_EXIT_DOC_PROCESSED - General Indicator
Data type: GENERAL_FLAGOptional: No
Call by Reference: Yes
EF_ALL_DOC_PROCESSED - General Indicator
Data type: GENERAL_FLAGOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR - unexpected error
Data type:Optional: No
Call by Reference: Yes
CURSOR_NOT_OPEN - used data base cursor not open
Data type:Optional: No
Call by Reference: Yes
NO_DATA - data base cursor does not contain documents
Data type:Optional: No
Call by Reference: Yes
INCOMPLETE_PACKAGE - inconsistent document data, number of lines too low
Data type:Optional: No
Call by Reference: Yes
LAST_PACKAGE - last data from data base cusrsor retrieved
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FKK_PT_GET_PACKAGE_OF_SEQUENCE 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_error | TYPE STRING, " | |||
| lv_ir_sequence_cursor | TYPE CURSOR, " | |||
| lv_et_package_to_handle | TYPE DFKKEXTDOC2_TAB, " | |||
| lv_cursor_not_open | TYPE DFKKEXTDOC2_TAB, " | |||
| lv_iv_cursor_counter | TYPE I, " | |||
| lv_et_data_for_next_package | TYPE DFKKEXTDOC2_TAB, " | |||
| lv_no_data | TYPE DFKKEXTDOC2_TAB, " | |||
| lv_iv_package_counter | TYPE I, " | |||
| lv_es_prerequisite_data_next | TYPE DFKKEXTDOC2, " | |||
| lv_iv_package_size | TYPE I, " | |||
| lv_incomplete_package | TYPE I, " | |||
| lv_ef_exit_doc_processed | TYPE GENERAL_FLAG, " | |||
| lv_last_package | TYPE GENERAL_FLAG, " | |||
| lv_ef_all_doc_processed | TYPE GENERAL_FLAG, " | |||
| lv_it_left_data_from_pre_fetch | TYPE DFKKEXTDOC2_TAB, " | |||
| lv_if_batch | TYPE GENERAL_FLAG, " | |||
| lv_if_print | TYPE GENERAL_FLAG, " | |||
| lv_is_exit_doc | TYPE DFKKEXTDOC2. " |
|   CALL FUNCTION 'FKK_PT_GET_PACKAGE_OF_SEQUENCE' "Fetchs a data package from a sequence (DB cursor) |
| EXPORTING | ||
| IR_SEQUENCE_CURSOR | = lv_ir_sequence_cursor | |
| IV_CURSOR_COUNTER | = lv_iv_cursor_counter | |
| IV_PACKAGE_COUNTER | = lv_iv_package_counter | |
| IV_PACKAGE_SIZE | = lv_iv_package_size | |
| IT_LEFT_DATA_FROM_PRE_FETCH | = lv_it_left_data_from_pre_fetch | |
| IF_BATCH | = lv_if_batch | |
| IF_PRINT | = lv_if_print | |
| IS_EXIT_DOC | = lv_is_exit_doc | |
| IMPORTING | ||
| ET_PACKAGE_TO_HANDLE | = lv_et_package_to_handle | |
| ET_DATA_FOR_NEXT_PACKAGE | = lv_et_data_for_next_package | |
| ES_PREREQUISITE_DATA_NEXT | = lv_es_prerequisite_data_next | |
| EF_EXIT_DOC_PROCESSED | = lv_ef_exit_doc_processed | |
| EF_ALL_DOC_PROCESSED | = lv_ef_all_doc_processed | |
| EXCEPTIONS | ||
| ERROR = 1 | ||
| CURSOR_NOT_OPEN = 2 | ||
| NO_DATA = 3 | ||
| INCOMPLETE_PACKAGE = 4 | ||
| LAST_PACKAGE = 5 | ||
| . " FKK_PT_GET_PACKAGE_OF_SEQUENCE | ||
ABAP code using 7.40 inline data declarations to call FM FKK_PT_GET_PACKAGE_OF_SEQUENCE
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.Search for further information about these or an SAP related objects