SAP QPKT_CODE_TEXT_READ Function Module for Read text segment for code
QPKT_CODE_TEXT_READ is a standard qpkt code text read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read text segment for code 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 qpkt code text read FM, simply by entering the name QPKT_CODE_TEXT_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: QPKT
Program Name: SAPLQPKT
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function QPKT_CODE_TEXT_READ 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 'QPKT_CODE_TEXT_READ'"Read text segment for code.
EXPORTING
I_CODE = "Code
I_CODEGRUPPE = "Code group
* I_DB_LESEN = 'X' "Indicator : read the database
I_KATALOGART = "Catalog type
* I_MANDT = SY-MANDT "Client
* I_SPRACHE = SY-LANGU "Language
IMPORTING
E_QPCT = "Language segment
EXCEPTIONS
NO_ENTRY = 1
IMPORTING Parameters details for QPKT_CODE_TEXT_READ
I_CODE - Code
Data type: QPCT-CODEOptional: No
Call by Reference: No ( called with pass by value option)
I_CODEGRUPPE - Code group
Data type: QPCT-CODEGRUPPEOptional: No
Call by Reference: No ( called with pass by value option)
I_DB_LESEN - Indicator : read the database
Data type: QALS-STAT01Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_KATALOGART - Catalog type
Data type: QPCT-KATALOGARTOptional: No
Call by Reference: No ( called with pass by value option)
I_MANDT - Client
Data type: QPCT-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SPRACHE - Language
Data type: QPCT-SPRACHEDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for QPKT_CODE_TEXT_READ
E_QPCT - Language segment
Data type: QPCT01Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ENTRY - No entry found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for QPKT_CODE_TEXT_READ 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_qpct | TYPE QPCT01, " | |||
| lv_i_code | TYPE QPCT-CODE, " | |||
| lv_no_entry | TYPE QPCT, " | |||
| lv_i_codegruppe | TYPE QPCT-CODEGRUPPE, " | |||
| lv_i_db_lesen | TYPE QALS-STAT01, " 'X' | |||
| lv_i_katalogart | TYPE QPCT-KATALOGART, " | |||
| lv_i_mandt | TYPE QPCT-MANDT, " SY-MANDT | |||
| lv_i_sprache | TYPE QPCT-SPRACHE. " SY-LANGU |
|   CALL FUNCTION 'QPKT_CODE_TEXT_READ' "Read text segment for code |
| EXPORTING | ||
| I_CODE | = lv_i_code | |
| I_CODEGRUPPE | = lv_i_codegruppe | |
| I_DB_LESEN | = lv_i_db_lesen | |
| I_KATALOGART | = lv_i_katalogart | |
| I_MANDT | = lv_i_mandt | |
| I_SPRACHE | = lv_i_sprache | |
| IMPORTING | ||
| E_QPCT | = lv_e_qpct | |
| EXCEPTIONS | ||
| NO_ENTRY = 1 | ||
| . " QPKT_CODE_TEXT_READ | ||
ABAP code using 7.40 inline data declarations to call FM QPKT_CODE_TEXT_READ
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 CODE FROM QPCT INTO @DATA(ld_i_code). | ||||
| "SELECT single CODEGRUPPE FROM QPCT INTO @DATA(ld_i_codegruppe). | ||||
| "SELECT single STAT01 FROM QALS INTO @DATA(ld_i_db_lesen). | ||||
| DATA(ld_i_db_lesen) | = 'X'. | |||
| "SELECT single KATALOGART FROM QPCT INTO @DATA(ld_i_katalogart). | ||||
| "SELECT single MANDT FROM QPCT INTO @DATA(ld_i_mandt). | ||||
| DATA(ld_i_mandt) | = SY-MANDT. | |||
| "SELECT single SPRACHE FROM QPCT INTO @DATA(ld_i_sprache). | ||||
| DATA(ld_i_sprache) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects