<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FM: read_text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667065#M295217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module read_text to get the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And loop at the output table parameter you have passed and read only the first line. for  the next loop break the statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt; if sy-tabix = 2.&lt;/P&gt;&lt;P&gt; exit.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; write:/ ......&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward points if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2006 05:33:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-14T05:33:50Z</dc:date>
    <item>
      <title>FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667064#M295216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to read header text from sales order.if thr r more than one lines then i want to read only one line.&lt;/P&gt;&lt;P&gt;if user enters spaces in first lines then i want to read only first line&lt;/P&gt;&lt;P&gt;how can i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 05:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667064#M295216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T05:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667065#M295217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the function module read_text to get the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And loop at the output table parameter you have passed and read only the first line. for  the next loop break the statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt; if sy-tabix = 2.&lt;/P&gt;&lt;P&gt; exit.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; write:/ ......&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls reward points if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 05:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667065#M295217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T05:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667066#M295218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the FM READ_TEXT will return the text in the table of the fm&lt;/P&gt;&lt;P&gt;table  : LINES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now read table LINES index &amp;lt;b&amp;gt;1&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;this will return the first line of the header text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 05:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667066#M295218</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2006-11-14T05:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667067#M295219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Function READ_TEXT.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'READ_TEXT'
  EXPORTING
*   CLIENT                        = SY-MANDT
    id                            =
    language                      =
    name                          =
    object                        =
*   ARCHIVE_HANDLE                = 0
*   LOCAL_CAT                     = ' '
* IMPORTING
*   HEADER                        =
  tables
    lines                         =
* EXCEPTIONS
*   ID                            = 1
*   LANGUAGE                      = 2
*   NAME                          = 3
*   NOT_FOUND                     = 4
*   OBJECT                        = 5
*   REFERENCE_CHECK               = 6
*   WRONG_ACCESS_TO_ARCHIVE       = 7
*   OTHERS                        = 8
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here table parameter is of type TLINE. &lt;/P&gt;&lt;P&gt;So after execution of this function just read first line of TLINE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your purpose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 05:35:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667067#M295219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T05:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667068#M295220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Use the READ_TEXT function module with following parameters,&lt;/P&gt;&lt;P&gt;language = sy-langu&lt;/P&gt;&lt;P&gt;name = 'VBBK'&lt;/P&gt;&lt;P&gt;lines  = tlines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table tlines willl contain all the lines. then u can delete those lines which u dont want....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 05:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667068#M295220</guid>
      <dc:creator>former_member283648</dc:creator>
      <dc:date>2006-11-14T05:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667069#M295221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this will help you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:   begin of tlinetab occurs 10.&lt;/P&gt;&lt;P&gt;        include structure tline.&lt;/P&gt;&lt;P&gt;data:   end of tlinetab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Sales order...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  thead-tdobject = 'VBBK'.&lt;/P&gt;&lt;P&gt;  thead-tdspras  =  sy-langu.&lt;/P&gt;&lt;P&gt;  thead-tdlinesize = '072'.&lt;/P&gt;&lt;P&gt;  thead-tdname = Sales order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from stxh where tdobject = thead-tdobject&lt;/P&gt;&lt;P&gt;                            and tdname   = thead-tdname&lt;/P&gt;&lt;P&gt;                            and tdid     = thead-tdid&lt;/P&gt;&lt;P&gt;                            and tdspras  = thead-tdspras.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'READ_TEXT'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              client                  = sy-mandt&lt;/P&gt;&lt;P&gt;              id                      = thead-tdid&lt;/P&gt;&lt;P&gt;              language                = thead-tdspras&lt;/P&gt;&lt;P&gt;              name                    = thead-tdname&lt;/P&gt;&lt;P&gt;              object                  = thead-tdobject&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ARCHIVE_HANDLE          = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         importing&lt;/P&gt;&lt;P&gt;              header                  = thead&lt;/P&gt;&lt;P&gt;         tables&lt;/P&gt;&lt;P&gt;              lines                   = tlinetab&lt;/P&gt;&lt;P&gt;         exceptions&lt;/P&gt;&lt;P&gt;              id                      = 1&lt;/P&gt;&lt;P&gt;              language                = 2&lt;/P&gt;&lt;P&gt;              name                    = 3&lt;/P&gt;&lt;P&gt;              not_found               = 4&lt;/P&gt;&lt;P&gt;              object                  = 5&lt;/P&gt;&lt;P&gt;              reference_check         = 6&lt;/P&gt;&lt;P&gt;              wrong_access_to_archive = 7&lt;/P&gt;&lt;P&gt;              others                  = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Atul Dhariwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 06:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667069#M295221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T06:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: FM: read_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667070#M295222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the field length in the data dictioray is unlimited .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.you need to create text object and link this object &lt;/P&gt;&lt;P&gt;with key fields of the table and reading this text and storing this text you need to use SAVE_TEXT and READ_TEXT fm's. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk the sample code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.create a text object using SE75 transaction .&lt;/P&gt;&lt;P&gt;2.Use FM : SAVE_TEXT to save this data with text object id.(data will be stored into STXH table).&lt;/P&gt;&lt;P&gt;3.Use READ_TEXT to retrive data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ws_thead LIKE thead,
i_tline LIKE TABLE OF tline WITH HEADER LINE.
data : x_matnr like mara-matnr.

c_mara(4) type c value 'MARA',
c_zid(4) type c value 'Z001'.


MOVE : x_matnr TO ws_thead-tdname, &amp;lt;-moving MATNR to store data 
c_mara TO ws_thead-tdobject,
sy-langu TO ws_thead-tdspras,
c_zid TO ws_thead-tdid.

CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = ws_thead
savemode_direct = 'X'
TABLES
lines = i_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.

IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

DATA: lws_id LIKE thead-tdid,
lws_name LIKE thead-tdname,
lws_object LIKE thead-tdobject.

lws_id = c_zid.
lws_name = x_matnr. &amp;lt;- reading data using key field(MATNR) 
lws_object = c_mara.


CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = lws_id
language = sy-langu
name = lws_name
object = lws_object
TABLES
lines = li_tline
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;&lt;/P&gt;&lt;P&gt;pls mark all hlpful answers&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 06:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-read-text/m-p/1667070#M295222</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-14T06:38:31Z</dc:date>
    </item>
  </channel>
</rss>

