You are on page 1of 6

Getting Started Newsletters Store

Products Services & Support About SCN Downloads


Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Log On Join Us Hi, Guest Search the Community
Activity Communications Actions
Browse
Enterprise Asset Management (SAP EAM)
Previous
post
Next
post
0 Tweet 5
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, lets 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 lets 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
Retrieving Longtext-lines for Reporting
Posted by Jogeswara Rao Kavala in Enterprise Asset Management (SAP EAM) on Aug 11, 2014 1:37:19 AM
Share 2
2 Like
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.

Lets 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. Lets see how this comes.
Let's see this number this way.

400100140302700000002

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. Lets 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 lets 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.

Further:
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 TEXT
OBJECT
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)

*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
KJogeswaraRao


PS: Members mght now have understood that though PM Objects have been illustrated here, this post applies to
Longtexts of other module objects also.
Follow SCN
Site Index Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright
Average User Rating
(3 ratings)
0 Tweet 5
637 Views
Products: sap_erp_f inancials, sap_erp_human_capital_management Topics: web_dynpro, business_intelligence,
enterprise_resource_planning Tags: sap, badi, hana, beginner, erp, quality, alv, order, sales, materials_management, plm, mrp,
erp_f inancials, cost, f ico, f inancials, material_management, logistics, sales_order, smartf orm
Share 2
2 Like
6 Comments
Like (0)
Kripa Rangachari Aug 11, 2014 7:16 AM
Very neatly presented!... Thanks!

Cheers,
Kripa Rangachari.
Like (0)
Jogeswara Rao Kavala Aug 11, 2014 7:18 AM (in response to Kripa Rangachari)
Thank you Kripa, Glad you liked it,
Like (1)
Dinesh K Aug 11, 2014 8:33 AM
Very good explanation sir..Thank you very much for sharing.



Thanks,
Dinesh
Like (1)
Jogeswara Rao Kavala Aug 11, 2014 8:55 AM (in response to Dinesh K)
Hi Dinesh,
Glad to receive your comments. Thank you very much.
Like (1)
snp gupta Aug 11, 2014 8:51 AM
Deep knowledge you have acquired sir,

Best
=snp
Like (0)
Jogeswara Rao Kavala Aug 11, 2014 8:54 AM (in response to snp gupta)
Thank you snp sir!