For many of the Functional people longtexts is a sort of complicated thing for the fact that there are no straight tables which store these lines. So, whenever we think of making some report displaying long texts, we generally stuck at the very initial stage of finding the source of this information. This document is aimed at clearing these concepts.

We know the longtexts are very widely used within all SAP objects. For example in PM module, Longtexts associated with Notification Header, Order Header etc, also the Long texts associated with Catalog-Codes in Notifications, Operations in Orders, Measuring document related.

In this post, we try to understand these concepts, through the longtexts of PM Order operations.

So, let’s try and see how we reach the Long text lines of an Order operation.

Essence of this document is centered at using a Function Module named READ_TEXT.  First let’s have a look at what this FM gives? For this, run Tcode SE37.


Give FM name in the Function Module field and Hit function key F8 or Click on Execute button shown above.


Now, here in the above screen, when we

  1. Enter the values for the fields marked Green
  2. Press Execute button

We get the long text lines into the table named LINES at the bottom (marked Red).

Now what are these fields we need to fill and where we will find these? The answer comes from the Order operation longtext page. In our example we have taken operation 0020 of an Order as shown below .


Here, we enter into the long text page upon clicking on the Longtext icon above. Now in the Longtext page click on GoTo –> Header  in the menubar.


Now we get the pop-up below, showing these field values required for SE37.


Let’s see the relation between the SE37 screen and the Order Longtext screen fields through the following picture. (The value in ‘Client’ field of SE37 need not be filled. System identifies and fills it).


Here, we understand all the field values except for one i.e. the TEXTNAME. The understood fields are namely :

Field name Value Remarks
LANGUAGE EN Constant as per your system
TEXTID AVOT Constant for Order Operation longtext
TEXTOBJECT AUFK Constant for Order related longtext

What we need to understand is the value of TEXTNAME i.e., 400100140302700000002. Let’s see how this comes. Let’s see this number this way.


First 3 characters (400) is the client number of the SAP (on which you are working)

Next 10 characters (1001403027) form the AUFPL field value of the operation

Next 8 characters (00000002) indicate the Operation number APLZL

Client number we always are aware of. Other two field values we should take from table (view) VIAUF_AFVC by inputting the Order number. Means, run Tcode SE16, give value VIAUF_AFVC and hit function key F7 .


Enter the Order number and Execute (F8).


We get this results screen.


Here as per the operations tab of the Order we see 3 records one for each operation.  Our operation in question is no.2. Let’s pick-up the corresponding values of AUFPL and APLZL from here.

So what I want to say is, the ABAPer passes the values of Orders from the Selection screen (of the ZTcode he develops) and extracts these values from the table and concatenates (joins) all the 3 vlaues together into TEXTNAME and executes the Function Module alongwith other values (Language, TextId, TextObject) to get the Longtext lines through the Table LINES of the Function Module.

Now let’s execute the FM READ_TEXT by filling these values.


See what we got


The FM READ_TEXT has given us all the 4 lines present in the Operation2 text . Now our ABAPer would use this info in his code for long text report.

Hope things are clear.


The values of TextId, TextObject vary as to which SAP object the Longtext belongs, so as the constituents of TextName field value also. Here I am attempting to tabulate few such examples  of SAP-PM area for the benefit of members.

Long Text Associated with TEXTID



TEXTNAME parts* Remarks
Notification Header Text LTXT QMEL QMNUM (Notifn no )
Item Text in Catalogs&Codes LTXT QMFE QMNUM + POSNR POSNR from  VIQMFE table
Cause Text in Catalogs&Codes LTXT QMUR QMNUM + QURNUM QURNUM from  VIQMUR table
Task Text in Catalogs&Codes LTXT QMSM QMNUM + QSMNUM QSMNUM from  VIQMSM table
Activity Text in Catalgs&Codes LTXT QMMA QMNUM + QMANUM QMANUM from  VIQMSM table
PM order Header Text KOPF AUFK ClientNo + AUFNR (Order)
Measuring Document LTXT IMRG MDOCM (Document no)
Tasklist PLPO ROUTING Client+TasklistType+Group+PLNKN+ZAEHL values (of PLPO table)

Refer to my reply to the 1st comment of this  Document

*The QMNUM, AUFNR values should be preceded by the leading zero’s (like 004300093626)

Easy retrieving of Longtexts in Smartforms

The information so far is more relevant to ALV reporting (though it works for smartforms also). In Smartforms, there is a convenient way of retrieving long texts, i.e., through include text. We declare the text type as Include text which gives us the provision of filling the TEXTNAME, LANGUAGE, TEXTID, TEXTOBJECT etc. As the the loop runs the TEXTNAME changes according to the SAP object number the respective longtext is retrieved. In the picture below an example for Notification Longtext in smartforms is given.


Related technical info

There is a table named STXH which stores the Text Header details. Here you get the number of text lines in the long text upon inputting the field values such as TDID, TDOBJECT, TDNAME etc. The following Selection screen (SE16) and the output are self explanatory .



So, that’s everything on this subject, which I had been thinking of documenting for the benefit of the forum, since sometime. Hope members find it useful.

Thank you


PS: Members might now have understood that though PM Objects have been illustrated here, this post applies to the Longtexts of objects in other module  too.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Patrick S.

    ..again and again you discover some useful piece of documentation or instruction.

    And as usual: done in a precise and excellent way ( that’s it’s usable for non-ABAPers).

    Thanks for your effort Jogeswara!

  2. Rahul Tekwani

    Though I have created my Account on SCN-EAM just few days back, but I used to read almost all such posts..Going through all the posts, I came to know that, Mr. Jogeswara Rao is a SAP PM Don!

    (A Fact, kindly dont consider it as an overstatement)

    1. K Jogeswara Rao Post author

      Thank you Rahul,

      It is purely ‘Give back to SCN‘ mode as long as things allow me to do. Nothing more than that. But, at the same time I continue to learn from you all.




    hello rao sir,

    as usual presented with neat explanation,

    for material i directly passed the material number for parameter NAME, and got the result..

    i tried passing the order number here but failed,

    u r post solved my problem…

    thanks a lot sir…

  4. Atish Das

    not only reading or extracting long text data; the information in this document also could  be used to create the long text data using create_text functional module. this is far less cumbersome than the LSMW method of creating long text.

    1. K Jogeswara Rao Post author

      Thank you Atish

      You are very fresh member to community. Welcome to SCN. I want to share this information while participating.

      When some post like the present one benefits you, then you can chose to click on ‘Like’ on the top right. At the same time you can give a Rating to the post by selecting few stars (1 to 5) provided below the post.



  5. Atish Das

    Hi, thank you for the document. I could use this info even to create long text using create text fm, which is easier than lsmw.


  6. Ajinkya Ket

    Hello Sir,

    You have nicely explained about the operation text but in my case i want to add long text for confirmation text (AUFK & RMEL)……can you let me know how i can achieve for long confirmation text?

    Waiting for your reply.

    Thank you.

    1. K Jogeswara Rao Post author

      TextId – RMEL

      Text Object – AUFK

      TextName: Client + RUECK (10 digit confirmation number) + 99999999

      • 99999999 stays with Textname as shown above until the operation is finally confirmed.
      • As soon as the operation is finally confirmed then this 99999999 changes to 00000001 for first confirmation, 00000002 for second confirmation and so on.
      • Hope you have understood that I am speaking about multiple confirmations of a single operation.


  7. Nic Teunckens

    With the introduction of SAPNote 2261311 new FunctionModules “READ_MULTIPLE_TEXTS” (Used to select texts to be read via wildcards or ranges tables) and “READ_TEXT_TABLE” (Used to select texts to be read via an internal table) can be implemented in your system to further ‘standardize’ fetching LongTexts in Reports … Before you could get an idea on how to do this in an optimized way looking at this BlogPost from 2014.


Leave a Reply