SAP OPERATION_MODIFY_TEXTLINE Function Module for Change planning item lines (short text lines)









OPERATION_MODIFY_TEXTLINE is a standard operation modify textline SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change planning item lines (short text lines) 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 operation modify textline FM, simply by entering the name OPERATION_MODIFY_TEXTLINE into the relevant SAP transaction such as SE37 or SE38.

Function Group: C0TX
Program Name: SAPLC0TX
Main Program: SAPLC0TX
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function OPERATION_MODIFY_TEXTLINE 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 'OPERATION_MODIFY_TEXTLINE'"Change planning item lines (short text lines)
EXPORTING
* INLINE_NUMBER = '1' "Number of inline lines
* LANGUAGE = SY-LANGU "Language Key
LTSCH = "Old long text key
LTSCH_NEU = "New long text key
* LTXT1 = ' ' "First inline
* LTXT2 = ' ' "Second inline line
* OBJECT = 'ROUTING' "Text object type for SAPscript wor
* TEXTID = ' ' "Text ID for SAPscript word process

EXCEPTIONS
KEIN_TEXT = 1 WRONG_INLINE_NUMBER = 2
.



IMPORTING Parameters details for OPERATION_MODIFY_TEXTLINE

INLINE_NUMBER - Number of inline lines

Data type: THEAD-TDTXTLINES
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - Language Key

Data type: T002-SPRAS
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

LTSCH - Old long text key

Data type: STXH-TDNAME
Optional: No
Call by Reference: No ( called with pass by value option)

LTSCH_NEU - New long text key

Data type: STXH-TDNAME
Optional: No
Call by Reference: No ( called with pass by value option)

LTXT1 - First inline

Data type: PLPO-LTXA1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

LTXT2 - Second inline line

Data type: PLPO-LTXA1
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECT - Text object type for SAPscript wor

Data type: TTXOB-TDOBJECT
Default: 'ROUTING'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEXTID - Text ID for SAPscript word process

Data type: TTXID-TDID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

KEIN_TEXT - No Long Text Exists

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_INLINE_NUMBER - Invalid number of inline lines

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for OPERATION_MODIFY_TEXTLINE 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_kein_text  TYPE STRING, "   
lv_inline_number  TYPE THEAD-TDTXTLINES, "   '1'
lv_language  TYPE T002-SPRAS, "   SY-LANGU
lv_wrong_inline_number  TYPE T002, "   
lv_ltsch  TYPE STXH-TDNAME, "   
lv_ltsch_neu  TYPE STXH-TDNAME, "   
lv_ltxt1  TYPE PLPO-LTXA1, "   SPACE
lv_ltxt2  TYPE PLPO-LTXA1, "   SPACE
lv_object  TYPE TTXOB-TDOBJECT, "   'ROUTING'
lv_textid  TYPE TTXID-TDID. "   SPACE

  CALL FUNCTION 'OPERATION_MODIFY_TEXTLINE'  "Change planning item lines (short text lines)
    EXPORTING
         INLINE_NUMBER = lv_inline_number
         LANGUAGE = lv_language
         LTSCH = lv_ltsch
         LTSCH_NEU = lv_ltsch_neu
         LTXT1 = lv_ltxt1
         LTXT2 = lv_ltxt2
         OBJECT = lv_object
         TEXTID = lv_textid
    EXCEPTIONS
        KEIN_TEXT = 1
        WRONG_INLINE_NUMBER = 2
. " OPERATION_MODIFY_TEXTLINE




ABAP code using 7.40 inline data declarations to call FM OPERATION_MODIFY_TEXTLINE

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 TDTXTLINES FROM THEAD INTO @DATA(ld_inline_number).
DATA(ld_inline_number) = '1'.
 
"SELECT single SPRAS FROM T002 INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
 
"SELECT single TDNAME FROM STXH INTO @DATA(ld_ltsch).
 
"SELECT single TDNAME FROM STXH INTO @DATA(ld_ltsch_neu).
 
"SELECT single LTXA1 FROM PLPO INTO @DATA(ld_ltxt1).
DATA(ld_ltxt1) = ' '.
 
"SELECT single LTXA1 FROM PLPO INTO @DATA(ld_ltxt2).
DATA(ld_ltxt2) = ' '.
 
"SELECT single TDOBJECT FROM TTXOB INTO @DATA(ld_object).
DATA(ld_object) = 'ROUTING'.
 
"SELECT single TDID FROM TTXID INTO @DATA(ld_textid).
DATA(ld_textid) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!