Extract the Long Text in txt file

Hi
I want a generic program which can extact the long text for any of the object(Material, Customer, Vendor..) and for n number of records in the upload file format taken by the LSMW for long text.
Regards,

using FM create_text  you can upload multiple lines of text..,  there is no  separate LSMW program for this.....

Similar Messages

  • How to Extract the Highlight Text in PDF File

    Hi Scripters,
    i want know, how to extract the hightlight text in pdf files for text only format for (*.txt) file extension save.
    regards
    baby

    Hi,
    Okay i'll try do best.
    thanks for your reply.
    Regards
    Baby

  • How to read the data in a txt file on a web site?

    I want to extract the numbers located in txt files on a web site. It's a normal url. Not a ftp.
    Does anyone know how to do it?

    Hi Tom,
    What do you want to extract from the text file??
    I wanted to extract an IP address from a pearl script from my FTP server and this was the vi that I used .I dont know if you are trying to do the same?
    Here is the vi.It is in LV 7.1
    Hope its helps .
    Good luck.
    ohiofudu.
    Certified LabVIEW Architect
    Certified TestStand Developer
    Attachments:
    PublicIP-Adresse.vi ‏31 KB

  • Unable to upload RTF file in the long text

    Hi all,
    Could you please help me out in this issue. I am trying to upload the RTF file in the long text editor through this menu path Text-> Upload->RTF file.The RTF file is about only 56 KB memory size consists only texts.
    I could able to select the file and when i am executing , ABAP dump is showing as follows:
    Runtime error : TABLE_INVALID_INDEX
    abap program : SAPLSTXK
    Whether any SAP notes to be applied for this ?
    Please throw you ideas
    Regards,
    Suresh.

    try this.
    REPORT YCMTESTE LINE-SIZE 255 MESSAGE-ID TD.
    PARAMETERS:
    TEXTNAME LIKE THEAD-TDNAME DEFAULT 'SAPSCRIPT-DRUCKERTEST',
    FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\temp\'.
    DATA: TEXTHEADER LIKE THEAD.
    DATA: TEXTLINES LIKE TLINE OCCURS 100 WITH HEADER LINE.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING NAME = TEXTNAME
    LANGUAGE = SY-LANGU
    OBJECT = 'TEXT'
    ID = 'ST '
    IMPORTING HEADER = TEXTHEADER
    TABLES LINES = TEXTLINES
    EXCEPTIONS OTHERS = 1.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'EXPORT_TEXT'
    EXPORTING CODEPAGE = '1133'
    FILE = FILE
    FORMATWIDTH = 132
    FORMAT_TYPE = 'RTF'
    HEADER = TEXTHEADER
    SSHEET = ' '
    WITH_TAB = ' '
    TABLES ITF_LINES = TEXTLINES
    EXCEPTIONS DOWNLOAD_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_WRITE_ERROR = 3.
    CASE SY-SUBRC.
    WHEN 0. MESSAGE S807 WITH FILE.
    WHEN 1. MESSAGE E815 WITH FILE.
    WHEN 2. MESSAGE E811 WITH FILE.
    WHEN 3. MESSAGE E814 WITH FILE.
    ENDCASE.
    Reference::[http://help.sap.com/saphelp_sm32/helpdata/en/d6/0db7f3494511d182b70000e829fbfe/content.htm]
    <removed_by_moderator>
    Edited by: Juan Reyes on May 16, 2011 12:05 PM

  • How to get Text from (.txt) file to display in the JTextArea ?

    How to get Text from (.txt) file to display in the JTextArea ?
    is there any code please tell me i am begginer and trying to get data from a text file to display in the JTextArea /... please help...

    public static void readText() {
      try {
        File testFile = new File(WorkingDirectory + "ctrlFile.txt");
        if (testFile.exists()){
          BufferedReader br = new BufferedReader(new FileReader("ctrlFile.txt"));
          String s = br.readLine();
          while (s != null)  {
            System.out.println(s);
            s = br.readLine();
          br.close();
      catch (IOException ex){ex.printStackTrace();}
    }rykk

  • How to add the long text in Production order through FM

    Hi,
    Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in Background.
    Now client wants to add the Long text (seperate TAB in production order and they want to update the VC details of Sales order in the Long text area).
    One option is after creation of Production order, through BDC(calling CO02 and update the long text) we  can update the long text and client doesn't want this option.
    Another option is after creation of Production order, using Function module SAVE_TEXT, Update the Long text in Production Order and this is not working in Production order (already my ABAP consultant checked it ).
    If any one of you came across this requirement, pl share with me how you addressed it.
    Regards
    A.Sureshbabu

    Hi,
    The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
    At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
    Order No.
    Line - 1
    Line - 2
    Line - 3
    Line - 4
    Line - 5
    12345
    txt - 1
    txt - 2
    txt - 3
    txt - 4
    txt - 5
    67890
    txt - a
    txt - b
    txt - c
    txt - d
    txt - e
    Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
    Regards,
    Vivek

  • Populate a table reading the data from a TXT file

    how can I populate a table reading the data from a TXT file?
    thanks

    Hey Kevin!
    Using FORMS.TEXT_IO to bulk load data from a file strikes me as re-inventing the wheel. It is just about justifiable in a self-service environment, but I regard the EXTERNAL TABLE is a better solution for that situation as well.
    The same applies to UTL_FILE. I think the ability to read text with UTL_FILE is primarily intended for read file-based configuration or file manipulation/processing rather than data loading.
    Re-writing a text file into SQL statements is too much like hard work (even with an editor that supports macro definition and regular expressions) for no real benefit. You lose all the bulk load peformance you would get from SQL*Loader. But for QAD I'd probably let you off with it.
    You missed out one obvious alternative: using Java to turn the contents of an XML file into a CLOB and inserting it into a table which is read by a PL/SQL procedure that parses the XML records and insert the retrieved data into a table.
    Stay lucky, APC

  • Reading long text from excel file to an internal table

    Hi
    Can any body tell me how to read long text from excel file to an internal table.
    When i am using this FM KCD_EXCEL_OLE_TO_INT_CONVERT then it is reading only 32 characters from each cell.
    But in my excel sheet in one of the cell has very long text which i need to upload into a internal table.
    may i know which FM or what logic i need to use for this problem.
    Regards

    Hi,
    Here is an example program.  It will upload an Excel file with two columns.  You could also assign the Excel structure dynamically, but I wanted to keep the example simple.  The main point is that the internal table (it_excel in this example) must match the Excel structure that you want to convert.
    Remember, this is just an example to help you figure out how to properly use the technique.  It will certainly need to be modified to fit your requirements, and as always there may be a better way to get the Excel converted... this is just one possibility that has worked for me in the past.
    *& Report  zexcel_upload_test                            *
    REPORT  zexcel_upload_test.
    TYPE-POOLS: truxs.
    TYPES: BEGIN OF ty_excel,
             col_a(10) TYPE n,
             col_b(35) TYPE c,
           END OF ty_excel.
    DATA: l_data_tab         TYPE TABLE OF string,
          l_text_data        TYPE truxs_t_text_data,
          l_gui_filename     TYPE string,
          it_excel           TYPE TABLE OF ty_excel.
    FIELD-SYMBOLS: <wa_excel>  TYPE ty_excel.
    PARAMETERS: p_file TYPE rlgrap-filename.
    * Pass the file name in the correct format
    l_gui_filename = p_file.
    * Upload data from PC
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename                = l_gui_filename
        filetype                = 'ASC'
        has_field_separator     = 'X'
      CHANGING
        data_tab                = l_data_tab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        OTHERS                  = 17.
    IF sy-subrc <> 0.
    *   MESSAGE ...
      EXIT.
    ENDIF.
    * Convert from Excel into the appropriate itab
    l_text_data[] = l_data_tab[].
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
        i_field_seperator    = 'X'
        i_tab_raw_data       = l_text_data
        i_filename           = p_file
      TABLES
        i_tab_converted_data = it_excel
      EXCEPTIONS
        conversion_failed    = 1
        OTHERS               = 2.
    IF sy-subrc <> 0.
    *   MESSAGE ...
      EXIT.
    ENDIF.
    LOOP AT it_excel ASSIGNING <wa_excel>.
    *  Do something here...
    ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM filename_get CHANGING p_file.
    *       FORM filename_get                                             *
    FORM filename_get CHANGING p_in_file TYPE rlgrap-filename.
      DATA: l_in_file  TYPE string,
            l_filetab  TYPE filetable,
            wa_filetab TYPE LINE OF filetable,
            l_rc       TYPE i,
            l_action   TYPE i,
            l_init_dir TYPE string.
    * Set the initial directory to whatever you want it to be
      l_init_dir = 'C:\'.
    * Call the file open dialog without multiselect
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = 'Load file'
          default_extension       = '.XLS'
          default_filename        = l_in_file
          initial_directory       = l_init_dir
          multiselection          = 'X'
        CHANGING
          file_table              = l_filetab
          rc                      = l_rc
          user_action             = l_action
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          OTHERS                  = 4.
      IF sy-subrc <> 0.
        REFRESH l_filetab.
      ENDIF.
    * Read the selected filename
      READ TABLE l_filetab INTO wa_filetab INDEX 1.
      IF sy-subrc = 0.
        p_in_file = wa_filetab-filename.
      ENDIF.
    ENDFORM.                    " filename_get
    Regards,
    Jamie

  • No CATS record exists for the long text in row 4

    Hi,
    When we are tyring to upload the time sheets of tha employees in se38 usinga  customized program, from Non sap to sap,  for a few employees we are getting an erro like No CATS record exists for the long text in row 4,  where are we supposed to verifiy, what causes this error.
    Please assist.
    Thanks,
    Shilpa.

    Your first step should be in your input file.  What is on the fourth line?
    Look into the Blueprint Specifications of your Custom Program for the parameters of that input file.

  • Error while reading the Long text Using READ_TEXT

    Hi friends,
    Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT  I am getting the following error if the text is not there.
    OUT_PURCH_PO ID GRUN language EN not found.
    I should not get this error Instead I should get the blank value.
    OUT_PURCH_PO   -  my material name.
    Following is my code.
    IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
       READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
       WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
         NAME = WA_EKPO-MATNR.
        CALL FUNCTION 'READ_TEXT'
           EXPORTING
             CLIENT            = SY-MANDT
             ID                =  ID
             LANGUAGE          =  SY-LANGU
             NAME              =  NAME 
             OBJECT            =  OBJECT
          IMPORTING
            HEADER            =  THEAD
           TABLES
             LINES             =  LTEXT.

    Hi,
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        client                  = sy-mandt
        id                      = id
        language                = sy-langu
        name                    = name
        object                  = object
      TABLES
        lines                   = ltext
      EXCEPTIONS                           " --> have this
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM

  • Get the long text into BADI from text editor

    hi all,
    I implemented BADI ME_PROCESS_PO_CUST, before saving the purchase order i am calling the text editor where i am writng
    the long text . but when save the text from the text editor the long text in the editor is not updating to the BADI.
    Can anybody help how can i get the long text to the BADI.
    Regards,
    Madhavi

    Hi
    Have you tried with interface 'IF_PURCHASE_ORDER_MM' with these methods in the BADI?
    IF_LONGTEXTS_MM~GET_TEXTOBJECT
    IF_LONGTEXTS_MM~GET_TYPES
    IF_LONGTEXTS_MM~GET_TEXT
    IF_LONGTEXTS_MM~SET_TEXT
    IF_LONGTEXTS_MM~ADOPT_TEXT
    IF_LONGTEXTS_MM~DELETE_TEXT
    IF_LONGTEXTS_MM~EDIT_TEXT
    Regards
    Eduardo

  • I get the long text description 0f transaction fb03

    Hi Gurus,
    How can I get the long text description in the information view (field <b>ZEILE</b>,
    data element EENO_ZEILE) on the G/L account documet overview(transaction Fb03)?
      My prob is, This field stored in a structure called
    Thanks in ad.
    Regds,
    Bala

    Hi,
    a) Find out for which <b>table</b> this long text is linked.
    b) Go to <b>TTXOB</b> table and in the field <b>TDOBJECT</b>, check whether this entry is present.
    c) If present, then use FM READ_TEXT, to get the long text value.
    Important parameters to be passed in READ_TEXT
    a) ID         
    b) Language (EN??)
    c) Name   ( I believe in this case it would be ZEILE)
    d) Object (TTXOB-TDOBJECT value)
    Regards,
    Subramanian V.

  • Get the long text from Text Editor

    Hi,
    I am using text editor to enter the long text, after entering the text in the text editor
    when press the save button i am getting the long text into the internal table . this is working fine till here.
    But when press SAVE button , i want the text into the internal table  and  the text editor to be closed.
    but here i am not able to get the data into internal  table as it is again creating text editor .
    Can anyboby help me .

    Hi,
    Refresh the table.

  • How to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    how to extract the audio of a zip file? if it helps I'm trying to add this album zip to my library

    Let's say you have a zipped audio collection (audio.zip) containing mp3 files. And you are at a Terminal prompt.
    List the files in the zip archive
    unzip -l audio.zip (that is ell)
    Extract all mp3 audio files into a new home directory folder called mymusic
    unzip -d ~/mymusic audio.zip \*.mp3
    Variations of the above will depend the zip contents, and internal structure. If the zipped audio collection was gzipped, or someone used rar on it, then the extraction process will be different.

  • Problem in loading the long text in bdc.

    Hai Friends,
                  I am uploading the material master using bdc, Here i need to upload the long text field. so am using the separate report for upload the long text field using the create_text function module. but the problem is the long text field only accepting 132 charactors. but i need to upload the 500 charactors. what i want to do now ?
    Regards ,
    Sathis Kumar R

    Hi Sathis,
    What u do is that while recording the text part in bdc , click on the first delete button,  and then create button and after that double click on the editor or click on the text-editor change button, a window will get opened , then click go-to menu -> change editor.
    there u can use loop the text table and wirte it according .
    eg
    PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_DELETE'.            "first delete
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_CREATE'.             " then create
      PERFORM bdc_field       USING 'LV70T-SPRAS'
                                    sy-langu.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TP_DETAIL'.             "if not double click then click on change button after the delete button and then click on the change-editor menu .
      PERFORM bdc_field       USING 'LV70T-SPRAS'
                                    sy-langu.
      PERFORM bdc_dynpro      USING 'SAPLSTXX' '1100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RSTXT-TXLINE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TXVB'.
      PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(02)'
      PERFORM bdc_field       USING 'RSTXT-TXPARGRAPH(03)'
      PERFORM bdc_field       USING 'RSTXT-TXLINE(02)'
                                    wa_itab-htext1.
      PERFORM bdc_field       USING 'RSTXT-TXLINE(03)'
                                    wa_itab-htext2.
      PERFORM bdc_dynpro      USING 'SAPLSTXX' '1100'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RSTXT-TXLINE(02)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=TXBA'.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4002'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/EBACK'.
    regards,
    Santosh Thorat

Maybe you are looking for

  • Recovery Does Not Reinstall Windows on HP Pavilion dv5-1127cl

    Hello, Recently, I tried to do a factory reset of my laptop. I used the recovery partition by pressing F11. It ran through reinstalling all of the HP software but then would randomly shut off when trying to reinstall windows. I tried the recovery pro

  • What should I put on an external hard drive?

    So I have a 13" Macbook Air with a 128 GB SSD. I installed a few games and I'm now at half full. I wanted to install WoW today (I know macs aren't meant for gaming) but seeing how it takes up 20GB, I decided against it. Now I want to get an external

  • Repeatable hard crash in webkit.dylib AIR 2.7 on OS X Lion - NOT case sensitive machine

    We've got a customer who is getting a repeated hard crash in AIR when he tries to run our app. At first we thought, "Oh, another case-sensitive Mac issue" and we told him to run the case sensitive command-line fix, but it turns out that isn't the iss

  • How do i switch my digidesign 003 factory from pro toold to logic mode

    hello everyone this has been eating me up all moring. i have just started working with this 003 and its works fine with the pro tools le that came with it but when i try and use logic pro 8 with it it just does not want to know. i get audio coming ou

  • Payment terms not update thru BAPI?

    HI, I am creating PO through BAPI_PO_CREATE1. PO is created succesfully and Payments field is not updaed in the PO. I am passing the value to the field POHEADER-PMNTTRMS. Along with this is there any value we have to pass to get this payment term upd