Reading Long Texts in BW

Hi,
I would like to dump the contents of R/3 in a table in BW. One of the fields in this proposed BW table is going to be of more than 1500 characters length. I cannot use ODS because we can only include InfoObjects of maximum 60 Chars in lenght. Other than Eugene's blog, I could not find much in the forum. It might take lot of effort for more than 1500 characters
My proposal:
1) Create a Function Module (may be an RFC enabled Function module) within BW that will connect to R/3 and pull the data. And then dump it into the table.
<b>Is it correct? If so, how do we do it?</b>
<b>Are there any other possible ways?</b>

Hi
This is very simple. Write an ABAP code in R/3 using call function READ_TEXT which reads the standard text (SO10 - tcode) and return the values, then again call the GUI_DOWNLOAD function to download the text file to your local drive. You can also use the STXH table to get the parameters like TDNAME, OBJNM, ID, LANG etc. for the function module in your program
Execute the program.
Once you got the file in your local drive follow the procedure in the BW side
Go to the specific InfoObject, in general tab check the box for "Char is document attribute" Save + Check + Activate the IO.
Then write an ABAP program (copy the code from this link) in BW save & activate the program after editing according to your need.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8046aa90-0201-0010-5e99-962948c83331
In this pdf document you can find a program in the last few pages and there would be two different codes, one for retreiving data from .pdf (pdf file) and another code for retreiving data from .DOC
Go to RSA1 -> Documents -> Enter characteristic name
then refresh the DOCUMENT page and double click on the characteristic. And now you can see the text file uploaded into BW and this can be used in the BEx report as well.
Let me know if you still have any doubts or if you get stuck anywhere in the above mentioned procedure.
PS - You dont want to change the length more than 60 chars in the maintenance of the infoobject even if it is possible.
~ Vaishnav

Similar Messages

  • How to read long text in Document line item

    Hi,
    How to read long text in FI Document line item.

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • Reading long text for more records at a time

    Hi all,
    We have a requirement for which that data like textid textname textobject  and language  must  be taken in to an internal table and for each record in the internal table i  have to read the long text inorder to compare the long text for the given search text.
    If i use Read_text inside the loop and endloop it works but it may not be appropriate in performance point of view.
    Is there any function module which can read long texts for more records at a time.
    The long text data in STXL will be in raw data format right? is there any way to convert raw data to normal so that by hitting the STXL i can read the long text data for more than one record at a time.
    Thanks in advance
    sanju.

    HI Sanju,
    Below is a code snippet which describes reading a long text frm the screen and appending it into the internal table.This code is actually to read the text from the screen and inserting a record into STXl and STXH.
    From your query what i understood is that you are storing the long text from the screen into a internal table and so you not want to use the read_text FM due to performance issue.
    Since tdline(tline table) is 132 char long format i use this small logic to read the screen data and append it to my internal table.
    *Data Declarations
      DATA: lv_strlen TYPE i,
            lv_create TYPE boolean,
            lv_desc TYPE string.
      DATA: ls_text TYPE tline,
            ls_basic_text TYPE stxh.
      DATA: lt_text TYPE ztty_tline_tab.
      CONSTANTS:
       lc_tdid TYPE  thead-tdid VALUE 'Z001',
       lc_tdobject TYPE thead-tdobject VALUE 'Z_ALERTS'.
    *Appending the text to the internal table.
      lv_strlen = STRLEN( iv_alert_text-alert_text ).
      lv_desc = iv_alert_text-alert_text.
      IF lv_strlen < 132.
        ls_text-tdformat = '*'.
        ls_text-tdline = lv_desc.
        APPEND ls_text TO lt_text.
      ELSE.
    *logic to wrap text
        DO.
          ls_text-tdformat = '*'.
          IF STRLEN( lv_desc ) < 132.
            ls_text-tdformat = '*'.
            ls_text-tdline = lv_desc.
            APPEND ls_text TO lt_text.
            EXIT.
          ENDIF.
          IF lv_desc+132(1) <> ' '.
            CONCATENATE lv_desc(131) '-' INTO ls_text-tdline.
            lv_desc = lv_desc+131.
          ELSE.
            ls_text-tdformat = '*'.
            ls_text-tdline = lv_desc(132).
            lv_desc = lv_desc+132.
          ENDIF.
          APPEND ls_text TO lt_text.
        ENDDO.
      ENDIF.
    Please award graciously if found helpful.Please do ask me if i have not answered you properly.
    Thank you.
    Message was edited by:
            P M Harish

  • 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

  • Not able to read long text in MCI10001

    Hi gurus,
    I am using MCI10001 for IW21 tcode where I have to read long texts of maintenance line items under Maintenance Tasks tab.
    Long text is not getting created for line items at this exit. Please suggest me if any exits/BADIs available where I can read the same.
    Thanks in advance.
    Anees

    Hello,
    You need to set FM ‘SAVE_TEXT’.or  'CREATE_TEXT'
    tdformat = '>X'  <-- this format you can not set directly in editor
    CONCATENATE '*' tdline
             INTO tdline
             SEPARATED BY space.
    this will make text to be non editable.
    Thank you...

  • ABAP Function to read long texts in HR Infotypes

    Is there any standard ABAP function to read long texts in HR infotypes like ABAP function to read comments entered in infotype 19

    HI ,
    try this code
    tables pcl1.
    include rpc1tx00.  " This include is explained on web page above
    start-of-selection. 
    perform fill_key.  perform get_data.end-of-selection.
    form fill_key. 
      tx-key-pernr = p_pernr.
      tx-key-infty = p_infty.
      tx-key-subty = p_subty.
      tx-key-objps = p_objps. 
      tx-key-sprps = p_sprps.
      tx-key-endda = p_endda. 
    tx-key-begda = p_begda.
    tx-key-seqnr = p_seqnr.
    "OR
      SELECT * INTO CORRESPONDING FIELDS OF wa_p0219
       FROM pa0219
       WHERE pernr = p_pernr
         AND subty =  p_subtyp
         AND endda = '99991231'.
      ENDSELECT.
    MOVE-CORRESPONDING gs_p0219 TO tx-key.
        MOVE '0219' TO tx-key-infty.
         IF wa_p0219-itxex = 'X'.
           MOVE-CORRESPONDING wa_p0219 TO tx-key.
         endif.
    endif
    endform.                    " fill_key
    form get_data. 
          import ptext from database pcl1(tx) id tx-key.
           loop at ptext.            "ptext is defined in above include  
                   write: / ptext-line. 
          endloop.
    endform.  " get_data
    Prabhudas

  • Definition of a "NOT RELEVANT GRANT" is missing. Read long text

    Dear All,
    Kindly suggest me how to post migo.
    During MIGO system throwing an error:
    Definition of a "NOT RELEVANT GRANT" is missing. Read long text
    Message no. GRANTMGMT408
    Regards
    Sanjeet

    Hi Sanjeet,
    It looks like your FI team has done config regarding Grands management and Funds Management.
    Plz consult with them...
    Check the SAP-Help for any doubts.
    SAP Library - Grants Management
    Plz check with transaction - "GMGRANTD" , if anything available.

  • Getting a runtime error in reading long text from production order

    Hi all,
    I am trying to read production order long text and the code is not showing any syntax error but if i execute it i am getting a runtime error as "Text object aufk is not available".
    But i did check for the text object , text id enties in TTXOB and TTXID tables. Also i am able to see the relevant text in tables STXH and STXL, dont know why i am getting this runtime error and unable to debug.
    I tried a lot searching in forums, but they all ask me to write the code in the way i did, so dont know what is the problem.
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                                =  'kopf'
                  LANGUAGE                 =  sy-langu
                  NAME                          = l_name
                  OBJECT                       = 'aufk'
                TABLES
                  LINES                         =  ilines
              write : ilines.
    Regards
    Jessica

    Hey Vijay,
    Thanks for you reply, It worked, i am not getting the runtime error, but also not getting the output.
    am i missing anywrite statements?
    Please check the code and suggest changes if required. i want to see the long text in the production order in the output. should i say write: ilines.?
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                            = 'KOPF'
                  LANGUAGE                      =  sy-langu
                  NAME                          = l_name
                  OBJECT                        = 'AUFK'
                TABLES
                  LINES                         =  ilines
                 write : ilines.
    Regards,
    Jessica.

  • Reading Long Text from MM03

    I need to read a long text from MM03, view - Sales Text. I cannot use FM READ_TEXT as there is no header data available there.
    How do i do it?

    Amol,
    Sales Text CANNOT exist without the HEADER DATA.
    You have to use READ_TEXT with these paramters.
    Text Name       Material Number (NAME)
    Language        EN
    Text ID         0001 (ID)
    Text object     MVKE (OBJECT)
    regards,
    Ravi
    Note : Please close the thread if the issue is solved.
    Message was edited by: Ravikumar Allampallam

  • Read long text error

    Hello,
    I am facing following error while updating a decision tree in basic pay "determine default for pay scale data". The error said: unforeseable error while generating, please read the long text.  What do I do?
    Thanks

    Dear ,
    you are required to double click on this error msg and then may u get the detailed error msg. only then it can be concluded wht the issue is till then plz go through the following details(ensure yiu are maintaining correct return value for the feature TARIF:
    With this feature you control whether the default value is determined
    from T001P from the personnel area and personnel subarea, or whether the
    default value is determined directly from the feature.
    The return value must have the form xx/yy/z, in which xx is the pay
    scale type, yy the pay scale area, and z the planned remuneration type.
    If the feature returns SPACE as a value, then the value pay scale type
    or pay scale area is determined by table T001P. If the value does not
    equal SPACE, then this value will be taken as the pay scale type or pay
    scale area.
    You can either enter return both values or only one of the two values.
    The missing value is determined from table T001P.
    hope it will work.
    Rgds,
    priyanka

  • Reading Long Text -LT31 -- VA02

    Hi All,
    Acc to my requirements.I want to display the text at the header level in the sap script form.
    I used the following code, the script form is displaying the limited text only,it is because of ITCSY value holds only 255.But I want to display more text.what changed do I need to do.
    Please help me out.I greatly appreciate your help in this.
    FORM GET_PACK_TEXT TABLES TAB_IN STRUCTURE ITCSY
    TAB_OUT STRUCTURE ITCSY.
      DATA GV_NAME LIKE THEAD-TDNAME.
      DATA GV_VBELN LIKE VBAK-VBELN.
      DATA GV_VBELV LIKE VBFA-VBELV.
      DATA GV_ID LIKE THEAD-TDID.
      DATA GV_OBJECT LIKE THEAD-TDOBJECT.
      DATA GV_LEN TYPE I.
      GV_ID = 'ZH20'.
      GV_OBJECT = 'VBBK'.
      DATA I_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
      READ TABLE TAB_IN WITH KEY 'LTAK-VBELN'.
      IF SY-SUBRC EQ 0.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = TAB_IN-VALUE
          IMPORTING
            OUTPUT = GV_VBELN.
        SELECT SINGLE VBELV FROM VBFA INTO GV_VBELV WHERE VBELN = GV_VBELN.
        GV_NAME = GV_VBELV.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            ID                            = GV_ID
            LANGUAGE                      = SY-LANGU
            NAME                          = GV_NAME
            OBJECT                        = GV_OBJECT
          ARCHIVE_HANDLE                = 0
          LOCAL_CAT                     = ' '
        IMPORTING
          HEADER                        =
          TABLES
            LINES                         = I_LINE
         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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      IF SY-SUBRC EQ 0.
        CLEAR TAB_OUT-VALUE.
        LOOP AT I_LINE.
          CONCATENATE TAB_OUT-VALUE I_LINE-TDLINE INTO TAB_OUT-VALUE
    SEPARATED BY SPACE.
          GV_LEN = STRLEN( TAB_OUT-VALUE ).
          IF GV_LEN > 355.
            CONDENSE TAB_OUT-VALUE.
            EXIT.
          ENDIF.
        ENDLOOP.
        MODIFY TAB_OUT TRANSPORTING VALUE WHERE NAME = 'PACK_TEXT'.
      ENDIF.
    ENDIF.
    ENDFORM.                    "GET_Pack_Text
    Thanks,
    Praveen

    Zarina,
    Thanks for your reply.
    I tried with that..but still getting the same output.
    I looped through ILINE the value is going to tab_out but the script form is not showing up the full text.
    Please send me the code to my ID [email protected]
    Thanks,
    Praveen

  • How to retrieve long text for a particular record

    Hi,
    I've been looking through some of the numerous posts relating to reading long texts but I can't seem to find out how to retrieve the necessary parameters for READ_TEXT for a particular record without using the GUI.
    Is there a way in ABAP that one could retrieve the parameters that are required to execute READ_TEXT just from one of the fields in the base table.  eg.  I would like to bring back a list of all materials with their associated long texts.  I can run a query on MARA for example and retrieve the necessary material information but I would like to know how I could get the necessary information, for each row in my results, to pass to READ_TEXT. 
    What information would I need to perform the above, if at all possible?
    Thanks in advance,
    Charles

    You can check out SE75.  Here is where the objects and ids are listed/maintained.  There is one trick to find the object/id.  That is,  create the text in the specific transaction.  If you are talking about header text for a sales orders, go to VA02 and enter some text and save.  Now go to SE16, enter STXH as the table name.  On the selection screen for STXH,  enter your user name for "created by" and enter the date.  Execute.  The record that you see is probably the text that you just created.  You can see the object, the id, and even how the name is built.  In this case,  it would be sales order number.
    Sometimes where you enter the text, there is a little "scroll" icon under the text editor, clicking that will tell you the object and id.  In some cases, this functionality is not there.
    Regards,
    Rich Heilman

  • Use SQL to get long text

    Hi,
      Is it possible to retrieve the long text in STXH and STXL by SQL instead of READ_TEXT FM??  How can i covert the HEX text back to normal text??
    Regards,
    Kit

    Hi,
    1. Only the way to Read long text is use the function module ‘READ_TEXT’ for which u need to pass TEXTOBJECT, TEXTID, TEXTLANGUAGE AND ONEMORE(I FORGET).
    Because the STXL and STXH these tables are cluster tables in which data stored in ‘LRAW’ field which is in RAW format which u can not understand and our normal SQL can also.
    2. so u can read most of cluster tables by Function modules only.
    3. u can modify or saved by ‘save_text’

  • How to Read the text enetered in Notes Tab of Invoice Doc. ( FB60, MIRO  )

    Hi All,
    We are trying to read the Text Entered in Notes Tab of Invoice Doc using the tcode FB60, MIRO..
    We are able to see the text when we use these tcode but can you please help us how to read these deatils in a program..
    We wanted to download these notes corresponding to the Invoivces..
    Thanks in Advance....
    Regards,
    Vidya.

    Hmm..you will get lots of links if you search the forum/google..
    Anyway - keep a breakpoint in SAVE_TEXT/READ_TEXT function module and create/display MIRO and FB60 documents - this tell you how it stores and reads long text.
    You should use READ_TEXT in your program with same header inputs with respective TDOBJECT and TDNAME parameters.

  • I can no longer read the text of my emails after I open them

    All of a sudden I can no longer read the text of my incoming mail, however if I click to reply I can read text then

    Go to Settings > General > Reset > Reset Network Settings; will not erase any data, just resets network connections such as wifi, and cellular data; Hope this helps.

Maybe you are looking for

  • Should i open folder and transfer cd file to n200 or whole fold

    I used mediasource to rip my cds to computer and ended up in widows explorer with a folder for the cd and inside the folder a file with cd in it.when i ripped using windows media i ended up with just a file with cd in it in explorer. In transfering c

  • How to get the files related to a module from server

    Hi, I am facing a problem. i have to extends controller but it has lot of imports from the same module but different folders. and all the files are in .class files. Can you tell me a process where i can download onto my local system from the server a

  • Apple TV connection lost after trying to install Sonos bridge

    I inadvertently deleted my network name (clicked on "forget network") while trying to install Sonos. Now it appears to be lost and I have lost my connection to apple tv through my airport.

  • Problem trying to import a CD

    I have a CD that, when I insert it into the CD drive, iTunes doesn't respond at all. It's the Bright Eyes - I'm Wide Awake It's Morning CD. I'm running iTunes 7.4 on a Windows machine. If I view the contents of the CD, I can see all 12 tracks, with a

  • Airdrop troubleshooting

    Looking for troubleshooting. My iPhone said it sent content to my Mac, but the content preview never popped up. I have no idea where to look for the content.