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

Similar Messages

  • 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

  • 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.

  • 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

  • Copy long text from PROJ to WBS

    When creating a new project (CJ01) I create new WBS and populate its fields from project automatically.
    I use enhancement and everything is copying ok except the long text.
    I do READ_TEXT and it get long text from project (TEXT_HEADER-TDNAME D99999999)
    Then i do SAVE_TEXT and not getting any error  (TEXT_HEADER-TDNAME E99999999)
    But the long text of WBS is empty.
    How should i copy long text right?
    I traced program and found out that after my enhancement is passed,
    WBS element is not activated and rewrited by initial data from PRPS-POST1
    How should i activate wbs then?
    Thank you for help!

    Hello,
    That code can help you If the text not exist.
    be carreful, that code have not declaration
    Thierry
    CALL FUNCTION 'NUMBER_GET_NEXT'
                EXPORTING
                  nr_range_nr = '01'
                  object      = 'PSTX'
                IMPORTING
                  number      = wl_name.
              ws_prtx-prmandt = sy-mandt.
              ws_prtx-probtyp = 'E'.
              ws_prtx-prpspnr = wv_posnr.
              ws_prtx-prtxtky = wl_name.
              APPEND ws_prtx TO wt_prtx.
              CALL FUNCTION 'CJVB_PRTX_POST'
                TABLES
                  tinsert = wt_prtx
                  tdelete = wt_d_prtx
                  tupdate = wt_u_prtx.
              ws_pstx-psmandt = sy-mandt.
              ws_pstx-pstxtky = wl_name.
              ws_pstx-pstxtar = '03'.
              ws_pstx-pstxtti = 'COMMENTAIRES'.
              ws_pstx-pstxthu = p_uname.
              ws_pstx-pstxthd = sy-datum.
              ws_pstx-pstxtau = p_uname.
              ws_pstx-pstxtad = sy-datum.
              ws_pstx-psformat = ''.
              APPEND ws_pstx TO wt_pstx.
              CALL FUNCTION 'CJVB_PSTX_POST'
                TABLES
                  tdelete = wt_d_pstx
                  tinsert = wt_pstx
                  tupdate = wt_u_pstx.
              IF sy-subrc = 0.
                wl_object = wc_obtxt.
                wl_id = wc_idtxt.
                wl_spras = sy-langu.
                ws_head-tdobject = wl_object.
                ws_head-tdname = wl_name.
                ws_head-tdid = wl_id.
                ws_head-tdspras = wl_spras.
                CALL FUNCTION 'SAVE_TEXT'
                  EXPORTING
                    client          = sy-mandt
                    header          = ws_head
                    insert          = ' '
                    savemode_direct = 'X'
                  TABLES
                    lines           = wt_tline
                  EXCEPTIONS
                    OTHERS          = 1.

  • 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

  • Printing long text from material master in from MM07ET

    Hello,
    I'm using WEE1 output condition to print labels for gr. I'm using the standard object MM07ET and I need to include in the label the long text from material master - table STXL. I know that there is a function READ-TEXT in ABAP for this but I don't have access to abap development. I need to know if it's possible to include a command in the sap scrip to retrive the long text without modifing the program SAPM07DR.
    Thank you!

    Hi,
    Sorry for the late Reply, Please use the following code in SAPSCRIPT
    /: INCLUDE &EKPO-EMATN& OBJECT MATERIAL IDGRUN LANGUAGE EN
    &EKPO-EMATN&  material Number ( Here please maintain the Field value which is used to print Material Number )
    MATERIAL is the Object Name
    GRUN Is Text ID
    EN Language
    You can use the above code for priting long text in the SAPSCRIPT FORM. to find the object name and ID please follow the below Steps
    Go to the window were you have maintained Long text... Double click on the text, then it will open a new window.. there Click on the top Goto-->Header.. here you will find the relevant data as follows:
    Language: EN
    Text ID : GRUN
    Text Object: MATERIAL
    Name: Material Code
    Regards
    GK.

  • How to read/extract text from pdf

    Respected All,
    I want to read/extract text from pdf. I tried using etymon but not succed.
    Could anyone will guide me in this.
    Thanks and regards,
    Ajay.

    Thank you very much Abhilshit, PDFBox works for reading pdf.
    Regards,
    Ajay.

  • Read Header Text  From VF03 Transaction

    Hi Frds,
                  I want to Read Header Text  From VF03 Transaction
    Read Transport Number and Transport Date From Vf03 Transaction.
    Guide Me Briefly
    How to pass the varaibles to the function Module
    Regards,
    Kabil

    hi Kabil ,
        Your issue completely accepted just keep in mind
    1) if you have to read both text you have to use read_text 2 times
    2) in that for first read_text
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0002'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF. 
        is ok for Header note 1 .(means first text ) but for second text your ID is change other thing is same .
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0013'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    Hope this will help you
    Thanking You,
    shrikant padwale.

  • 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...

  • Propagate long text from order to notification, notification to order

    Hi Experts!
    Like in subject I want to propagate long text from PM order to PM notification and the other way round. If text will be changed in one document it should be changed in second too.
    Have you any idea how to do that?
    Thank from advance
    Bartek
    Edited by: Julius Bussche on May 4, 2009 11:25 AM
    Subject formatting corrected.

    Hi,
    If these are two different fields having different data elements then I dont think its possible until and unless they both have the same data element...
    if they have the same data element I think you can keep the long text for the data element and it will reflect both the sides...
    Regards,
    Siddarth

  • Printing long text from Routing instead of Production order for an order.

    Hi Gurus,
    When a production order prints it is printing  the long text from the routing master rather than the long text on the actual production order.
    This field is used to provide specific instructions in special circumstances in addition to the standard text.
    I need system to be changed so that printing takes long text from production order.
    Please help me.
    Naveen.A

    Hi,
    In the production order long text, the text we are maintaining is only for information. It can't be able to print. In Production order, copies all the masters and the texts which we are maintaining in the masters only will be able to print. Standard SAP will not print the production order long text.
    Regards,
    V. Suresh

  • 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.

  • How to Add Long Text from CA10 on SAP Script

    Hi Friends,
    I got a requirement to add a long text from CA10 on to the SAP Script.
    How to do this ?
    Is it using INCLUDE ?
    Please give me some solution
    Thanks in Adv.

    Hi Bhupal,
    Could you tell me how did u add the long text from CA10.  I have the same requirement.
    Thanks in advance.
    Manisha

Maybe you are looking for

  • Line types in smartforms

    Hi all, I created a template in smartforms with three line types. but wen i executed, only the template frame is displayed. the line type name is not displayed. how can i display  the text in the template frame. please explain. I am new to smartforms

  • Is there a tag called left_col in HTML5 ?

    Just started watching a Lynda.com video tutorial called: "Creating a First Website with DW-CC-2014". Not sure if I'm missing something, but, near the beginning of the course Paul Trani features a video of the code view where an HTML5 tag called left_

  • IOS 5 contacts: not shown in address book, shown in spotlight

    A friend of mine with an iPhone4 and iOS5 reported to me he could not find (had lost) some contacts in the address book. When i used the spotlight-page (swipe in the homescreen so you get to see the screen to the left of the homescreen) COULD find th

  • Import video from youtube to keynote

    How do I import a video from youtube, so that I can add it to a keynote presentation?

  • Utilisation de VGF

    Bonjour, J'utilise une architecture "maître esclave" avec la fonction de "notificateur".  Dès lors que j'envoie une notification, ma boucle esclave l'execute. Une notification qui est l'état "gradient" s'execute pendant un certain temps et je souhait