SAP CO_PRINT_GET_LTXT_CMP Function Module for NOTRANSL: Druck: Langtext zur Komponente beschaffen
CO_PRINT_GET_LTXT_CMP is a standard co print get ltxt cmp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Druck: Langtext zur Komponente beschaffen 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 co print get ltxt cmp FM, simply by entering the name CO_PRINT_GET_LTXT_CMP into the relevant SAP transaction such as SE37 or SE38.
Function Group: COPRINT
Program Name: SAPLCOPRINT
Main Program:
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_PRINT_GET_LTXT_CMP 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 'CO_PRINT_GET_LTXT_CMP'"NOTRANSL: Druck: Langtext zur Komponente beschaffen.
EXPORTING
RESBD_P_IMP = "Component structure for use in print reports
* FLG_TABLE = "Generic Type
* LWIDTH = 79 "Predefined Type
IMPORTING
LTXT_KEY_EXP = "Key for reading long texts
TABLES
* LTXT_LINES_EXP = "SAPscript: Text Lines
EXCEPTIONS
NO_LONG_TEXT = 1 ERROR_READING_LTXT = 2
IMPORTING Parameters details for CO_PRINT_GET_LTXT_CMP
RESBD_P_IMP - Component structure for use in print reports
Data type: RESBD_POptional: No
Call by Reference: No ( called with pass by value option)
FLG_TABLE - Generic Type
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
LWIDTH - Predefined Type
Data type: IDefault: 79
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_PRINT_GET_LTXT_CMP
LTXT_KEY_EXP - Key for reading long texts
Data type: LTXT_KEYOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CO_PRINT_GET_LTXT_CMP
LTXT_LINES_EXP - SAPscript: Text Lines
Data type: TLINEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_LONG_TEXT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_READING_LTXT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_PRINT_GET_LTXT_CMP 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_resbd_p_imp | TYPE RESBD_P, " | |||
| lv_ltxt_key_exp | TYPE LTXT_KEY, " | |||
| lv_no_long_text | TYPE LTXT_KEY, " | |||
| lt_ltxt_lines_exp | TYPE STANDARD TABLE OF TLINE, " | |||
| lv_flg_table | TYPE C, " | |||
| lv_error_reading_ltxt | TYPE C, " | |||
| lv_lwidth | TYPE I. " 79 |
|   CALL FUNCTION 'CO_PRINT_GET_LTXT_CMP' "NOTRANSL: Druck: Langtext zur Komponente beschaffen |
| EXPORTING | ||
| RESBD_P_IMP | = lv_resbd_p_imp | |
| FLG_TABLE | = lv_flg_table | |
| LWIDTH | = lv_lwidth | |
| IMPORTING | ||
| LTXT_KEY_EXP | = lv_ltxt_key_exp | |
| TABLES | ||
| LTXT_LINES_EXP | = lt_ltxt_lines_exp | |
| EXCEPTIONS | ||
| NO_LONG_TEXT = 1 | ||
| ERROR_READING_LTXT = 2 | ||
| . " CO_PRINT_GET_LTXT_CMP | ||
ABAP code using 7.40 inline data declarations to call FM CO_PRINT_GET_LTXT_CMP
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.| DATA(ld_lwidth) | = 79. | |||
Search for further information about these or an SAP related objects