<?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: Load text file in database in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356275#M805288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi deepankar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           Thank you for your reply, can you explain me, how we relate our own database and the standard text for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           do we need to create any field in our database for this text id, pls explain me clearly.&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;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2008 05:29:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-25T05:29:27Z</dc:date>
    <item>
      <title>Load text file in database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356273#M805286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In dialog programming, am using table control inwhich i want to upload a text file as the value for a particular field. How to store in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls explain me with the example coding part also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 05:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356273#M805286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-25T05:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Load text file in database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356274#M805287</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;try this hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward if help.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The usage of texts in SAP is very generic and it is used for all entities and documents . For example the texts exist for Vendor master / CUstomer master and in Sales as well as Purchase orders at item and header level .The long texts are used to maintain certain informative texts which the user wants to have and major benefit is that the additional long texts can be provided to the user through functional customising in IMG - SPRO you do not need any ABAP exit or enhancement for this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can maintain these texts programatically using the FM :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE_TEXT &lt;/P&gt;&lt;P&gt;SAVE_TEXT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while you can read the existing texts using the FM ' READ_TEXT' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this purpose you can also go thru this blog /people/deepak.bhalla/blog/2005/01/24/storing-and-retreiving-of-texts .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving extract from same below : &lt;/P&gt;&lt;P&gt;Please let me know if you need anything further on this .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;There are following ways of storing text in SAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Using Text Object and Text ID&lt;/P&gt;&lt;P&gt;2. Using Standard text with placeholders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Using Text Object and Text ID:&lt;/P&gt;&lt;P&gt;I am assuming that we already have a data in structure required by function module save_text for tables paramenter lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use Transaction SE75 to create Text Object and Text ID.&lt;/P&gt;&lt;P&gt;2. Choose first radio button Text Object and ID's&lt;/P&gt;&lt;P&gt;3. Click at create. It will create Text Object.&lt;/P&gt;&lt;P&gt;4. Create Text ID for Text Object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this created Text ID and Text Object can be used to Save and Retreive texts using following function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZSAVE_READ_TEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;Save_read_indicator = 'X'&lt;/P&gt;&lt;P&gt;header = p_header&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;lines = p_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exporting parameter Save_read_inidcator type char1. default 'X' for Save.&lt;/P&gt;&lt;P&gt;Header should be of type thead&lt;/P&gt;&lt;P&gt;Tables parameter lines should be of type tline.&lt;/P&gt;&lt;P&gt;Header values should be populated as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_header-tdobject = name of the text object created.&lt;/P&gt;&lt;P&gt;p_header-tdname = It can be any Unique name.&lt;/P&gt;&lt;P&gt;p_header-tdid = name of text id created.&lt;/P&gt;&lt;P&gt;p_header-tdspras = sy-langu.&lt;/P&gt;&lt;P&gt;p_header-tdtitle = title of text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table P_lines will contain all data that is to be saved.It may be through Text control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function module save_text as follows to Save text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If save_read_indicator = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAVE_TEXT' &lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;client = sy-mandt&lt;/P&gt;&lt;P&gt;header = p_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FUNCTION =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NEWHEADER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;lines = p_line&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ID = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LANGUAGE = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NAME = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OBJECT = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 5.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ELSE.&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 = TEXT_ID&lt;/P&gt;&lt;P&gt;LANGUAGE = SY-LANGU&lt;/P&gt;&lt;P&gt;NAME = Same as TDNAME in Save_text&lt;/P&gt;&lt;P&gt;OBJECT = TEXT_OBJECT&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;LINES = LI_LINE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ID = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LANGUAGE = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NAME = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NOT_FOUND = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OBJECT = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REFERENCE_CHECK = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WRONG_ACCESS_TO_ARCHIVE = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 8.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Using Standard text with placeholders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am assuming that for all placeholders we will have value availble.&lt;/P&gt;&lt;P&gt;1. Maintain standard text with place holder using transaction SO10.&lt;/P&gt;&lt;P&gt;for example :&lt;/P&gt;&lt;P&gt;Dear &amp;amp;1,&lt;/P&gt;&lt;P&gt;Your purchase requisition &amp;amp;2 was approved on &amp;amp;3 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use following following function module to read Standard text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_STDTEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id = 'ST'&lt;/P&gt;&lt;P&gt;language = sy-langu&lt;/P&gt;&lt;P&gt;name = name of standard text&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USE_AUX_LANGUAGE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USE_THRUCLIENT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LOCAL_CAT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;lines = p_std_text&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ID = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LANGUAGE = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NAME = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NOT_FOUND = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REFERENCE_CHECK = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 6.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;3. Use following code to replace Placeholders returned in table p_std_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at p_std_text.&lt;/P&gt;&lt;P&gt;SEARCH p_std_text-tdline FOR '&amp;amp;1'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;1' WITH p_name INTO p_std_text-tdline.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;SEARCH p_std_text-tdline FOR '&amp;amp;2'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;2' WITH p_name INTO p_std_text-tdline.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;SEARCH p_std_text-tdline FOR '&amp;amp;3'.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;REPLACE '&amp;amp;3' WITH p_name INTO p_std_text-tdline.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY p_std_text.&lt;/P&gt;&lt;P&gt;Endloop.[/nobr]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 05:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356274#M805287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-25T05:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load text file in database</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356275#M805288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi deepankar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           Thank you for your reply, can you explain me, how we relate our own database and the standard text for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           do we need to create any field in our database for this text id, pls explain me clearly.&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;Regards&lt;/P&gt;&lt;P&gt;Rajaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 05:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/load-text-file-in-database/m-p/3356275#M805288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-25T05:29:27Z</dc:date>
    </item>
  </channel>
</rss>

