You are on page 1of 4

Free SAP Training & Tutorial A Free SAP Functional And Technical Tutorial And Training For ABAP,

SAP QUERY,
ALV, SMARTFORMS, SD, PP, MM, QM, FICO

ABAP Read_Text Function Module Tutorial To Read Long Text
09.07.2010 | Author: | Posted in ABAP
In todays tutorial, I want to show you how to use the READ_TEXT function module to read SAP long text. Every text in SAP has its own
ID and NAME, by passing these parameters into the READ_TEXT function, we can get all the text in the SAP long text object.
Heres how to do it, for example well be using long text from Sales Order.
1. Execute tcode VA02 and enter the Sales Order number.
2. Press enter to display the Sales Order data. Choose GoTo -> Header -> Texts
3. Double click the Header Note text and enter the long text in the text editor.
4. Click CTRL+S to save the Sales Order data.
Sap SD Module Sap ABAP Training Sap Sap Tutorial
Airport Jobs (Now Hiring)
InquireHow.com
$19-$24/Hr. 7 Positions Available. Apply Now - Start Working Tomorrow
ABAP Read_Text Function Module Tutorial To Read Long Text | Free ... http://www.freesaptutorial.com/abap-read_text-function-module-tutorial-...
1 of 4 7/16/2013 9:50 AM
5. Now that we need to get the ID, NAME and OBJECT of the text object to be used as the input parameters of READ_TEXT function
module, to get this information, you can execute VA02 or VA03 and enter the Sales Order number again.
Choose GoTo -> Header -> Texts
6. Now double click inside the long text editor.
7. Choose Goto -> Header.
8. On the next window screen, you will see all the parameters required for the READ_TEXT function. (Name, Language, ID, Object)
9. Now lets get the text using ABAP, open your ABAP editor (SE38), copy this code below.
"A sample code to use READ_TEXT FM
"www.freesaptutorial.com
data:
BEGIN OF header OCCURS 0,
ld_txt1(163),
ld_txt2(163),
ld_txt3(163),
END OF header.
DATA: li_lines LIKE STANDARD TABLE OF tline WITH HEADER LINE,
ID like THEAD-TDID,
TNAME LIKE THEAD-TDNAME,
TDOBJECT like THEAD-TDOBJECT.
ID = '0001'.
TNAME = '1820000009'.
TDOBJECT = 'VBBK'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = id
language = sy-langu
name = TNAME
object = TDOBJECT
TABLES
lines = li_lines.
READ TABLE li_lines INDEX 1.
IF sy-subrc = 0.
ABAP Read_Text Function Module Tutorial To Read Long Text | Free ... http://www.freesaptutorial.com/abap-read_text-function-module-tutorial-...
2 of 4 7/16/2013 9:50 AM
header-ld_txt1 = li_lines-tdline.
ENDIF.
READ TABLE li_lines INDEX 2.
IF sy-subrc = 0.
header-ld_txt2 = li_lines-tdline.
ENDIF.
READ TABLE li_lines INDEX 3.
IF sy-subrc = 0.
header-ld_txt3 = li_lines-tdline.
ENDIF.
WRITE:/ header-ld_txt1.
WRITE:/ header-ld_txt2.
WRITE:/ header-ld_txt3.
10. Now execute the program (F8), you will see the long text from the header note text object.
Popularity: 12% [?]

Related Tutorial " ABAP"
Printing Several Forms In One Request Using ABAP
How To Add Variable Into Your Status Message ABAP
Using TYPES as Internal Table Structure in ABAP
Function To Call SNRO Next Number ABAP
How To Disabled Selection Screen Parameter Using ABAP
ABAP Round Function To Round Up And Down Number
How To Change User Password In SAP Login
Function Modules In SAP
Convert Number To words Using ABAP
How To Open SAP Transaction Using ABAP Function


Recent Tutorials
Create Table Maintenance Display In SAP Create table display to maintain tables values using SM30
Create Table Maintenance Generator In SAP Maintaining SAP Transparent table values using maintenance generator
Table Relationship In SAP Learn How To Find Tables Relationships in SAP
Convert Number To words Using ABAP Find out how to convert numbers into words Using ABAP
How To Maintain Long Text Object in SAP Maintain long text object in SAP
How To Know What TCODE Used In ABAP Program Find TCODE For your ABAP Program Report
How does CRM Work? Learn how CRM system works to run your business
Why SAP CRM is the Best Choice? The reasons why CRM application is the best choice
Difference Between CRM System and CRM Strategy What's the difference between CRM system and its strategy
CRM for a Better Customer Service Learn how CRM could make your customer service much better
Costs of Implementing CRM Software Learn the how much cost you need to prepare when implementing CRM

Sap Program Sap Data Sap Basics Sales Orders Sap
Six Sigma
www.crnrstone.com
From strategy to execution with expert financial services advisors
ABAP Read_Text Function Module Tutorial To Read Long Text | Free ... http://www.freesaptutorial.com/abap-read_text-function-module-tutorial-...
3 of 4 7/16/2013 9:50 AM
Popular Tutorials
(none)

Categories
ABAP Basis & Configuration
ALV SAP BW (Business Warehouse)
BAPI SAP Interview Questions
SAP Tables SAP Overview
Transaction Codes FI SAP Query
MM SAP Script
PP SAP Tutorial FI Module
QM MM Module
SD PM Module
SAP Functional MM PP Module
SD QM Module
White Papers SD Module
Uncategorized SmartForms
User-Exits



Home | About | Contribute | Privacy
Copyright 2011 freesaptutorial.com.
Free SAP Tutorial is not associated with SAP AG in Germany or in any other country.
SAP is a registered trade mark of SAP AG.
ABAP Read_Text Function Module Tutorial To Read Long Text | Free ... http://www.freesaptutorial.com/abap-read_text-function-module-tutorial-...
4 of 4 7/16/2013 9:50 AM

You might also like