Long Text  To Short text

Hi ALL,
I am getting a long text(around 1000 chars long) in one of my field and I need to divide it into small chunks of 255 char and send it in the table form.
Is there any functional module available for this or any standard statement?
Points would be rewarded for the help.

You can use the RKD_WORD_WRAP FM.
DATA: L_CHAR(1000).
DATA: BEGIN OF IT_LINE OCCURS 0,
      TEXT(255),
      END   OF IT_LINE.
L_CHAR   = 'this is the string to table test' .
CALL FUNCTION 'RKD_WORD_WRAP'
  EXPORTING
    TEXTLINE                  = L_CHAR
    OUTPUTLEN                 = 255  "<< length of the output text
TABLES
   OUT_LINES                 = IT_LINE
* EXCEPTIONS
*   OUTPUTLEN_TOO_LARGE       = 1
*   OTHERS                    = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT IT_LINE.
  WRITE: / IT_LINE-TEXT.
ENDLOOP.
Regards,
Naimesh Patel

Similar Messages

  • Long Text to Short Text connversion in IW31/IW32

    Hi Experts,
    I am working on a requirement where I need to overwrite the short text for material description with the long text while creating the maintenance order in IW31/IW32.
    Initially I thought of handling this in a implementation of BADI IWO1_PREQ_BADI in method DECISION_COLL_PREQ.
    But this this method is gettign triggered when the paurchasing data is being entered and even before the long text is entered.
    Once the order is ready to be saved, and once the user clicks on save I want to write this conversion where I can copy the long text into short text overwriting the material description in component tab of IW31/IW32.
    Please check and suggest the BADI/userexits for thsi purpose.
    Regards
    Kishore

    Hi Kishore,
    Go to transaction SE24, class name CL_EXITHANDLER, go to methods, double click on method GET_INSTANCE.
    Set a break point at
    CALL METHOD cl_exithandler=>get_class_name_by_interface
    EXPORTING
    instance = instance
    IMPORTING
    class_name = class_name
    CHANGING
    exit_name = exit_name
    EXCEPTIONS
    no_reference = 1
    no_interface_reference = 2
    no_exit_interface = 3
    data_incons_in_exit_managem = 4
    class_not_implement_interface = 5
    OTHERS = 6.
    CASE sy-subrc.
    Now run trasaction IW31, press f8 till you reach bfore save button, enter the long text and all, now press the save buttton, control will break if in case any BADi is there(I think there is), exit name and instance will give you the BADI details.
    I think this is one of the simplest way.
    Thanks and Regards,
    Antony Thomas
    Edited by: Antony Thomas on Aug 10, 2010 12:13 PM

  • Hierarchy node text shows short text instead of medium text in WebI report

    Hi,
    We have created a simple Hierarchy suing Tx RSH1.
    US -> North Carolina
              South Carolinakey
             Rest of America
    Please note "North Carolina" is the medium text for the node while the short text which can contain max of 10 chars is "North Caro"
    We have used and activated the hierarchy within the BEx query. Text display with "Medium Text" has been enabled for the InfoObject. The display on the BW report is as expected showing the medium text for all levels and all modes.
    When a universe is built on the query and a WebI report is created based on the universe everything works fine other than than the Hierarchy text for different levels and nodes. Instead of showing the Medium text, the short text is getting display.
    We took out the text object from the Universe in the Universe designer and went ahead with the key and medium text, but that did not help.
    Is this a known bug? Is there a workaround for this issue?
    We are on XI 3.1 SP3.
    Rgds

    Hi,
    I am working on BO XI 3.1 SP2.
    I have displayed the medium text for the hierarchy nodes as:
    In my universe three detail objects(key, medium name and long name) gets generated for each hierarchy node.
    I have copied the definition of L01 Medium name (detail object) in the L01 dimension object. similarly for other hierarchy nodes.
    i.e. L02, L03.. etc.
    Now the master data which have been loaded for the medium name will be displayed.
    Regards,
    Rohit

  • Work Order Header Short Text & Operation Short Text Issue

    Hi All,
    There is one issue while creating the work Order through IW31. When I put the Header Short Text same short text is transpose in to the First Operation short text as per STD SAP behaviour but if I change First Operation short text in creation(IW31) and save and come back in IW32 or IW33 it is showing the same Header Short Text  but not changed one.
    Why it is so???
    I  Want to Edit the First Operation short text in IW31 only not in IW32.
    If anybody have explaination on this please let me know.Its SAP BUG????
    I am Using ECC6.0
    BR
    Rakesh

    Hello Pete,
    No i don't want same short text at Operation short text. Actually when i am in TC IW31 creating Order By default Header Short text is transfer to Operation Short text as per SAP STD functionality when at the same time i change the Operation short text and save and come back and see the Order in IW33 & IW32 i am not able see the changed Operation short text which i changed at  IW31 while creation of order.It showing the same short text of order Header .Why so.......????
    BR
    Rakesh

  • How can erase incon text from short text when cursor over on pushbutton?

    Hi all.
    I have pushbutton ,i done by fuction code (selection screen)
    Eg:sscrfields-functxt_01 = '@0Y@ Create'
    when i have move on pushbutton by mouse cursor ,i have short discription like @0Y@ Create ,it displayed with icon code, i want remove my icon code from short text.
    pls advice me.
    regards.
    Raju j

    to avoid that use the following code.
    data: itext like SMP_DYNTXT  .
    itext-TEXT = 'Logoff' .
    itext-ICON_ID = '@15@' .
    itext-ICON_TEXT = 'Text to be displayed on the Button' .
    itext-QUICKINFO = 'Quick Info' .
    move: itext to sscrfields-functxt_01 .
    Regards
    Raja

  • CL_SALV_TREE not displaying medium and short text

    Hi All,
            Is it possible to get the medium and long text to be displayed using SALV TREE(CL_SALV_TREE)? I have searched the forums and got the below information. Is there any other way?
    [CL_SALV_TREE;
    [http://www.sapfans.com/forums/viewtopic.php?f=13&t=351428]
    Regards,
    Srikanth.

    It looks like a Bug. This method COMPLETE_METADATA_TREE of the class CL_SALV_CONTROLLER_METADATA is responsible for setting up the column headings. The code lines in the methods are:
      field-symbols: <fcat> type LVC_s_FCAT.
      loop at t_fieldcatalog assigning <fcat>.
        if not <fcat>-scrtext_s is initial.
          <fcat>-coltext = <fcat>-scrtext_s.
        elseif not <fcat>-scrtext_m is initial.
          <fcat>-coltext = <fcat>-scrtext_m.
        elseif not <fcat>-scrtext_l is initial.
          <fcat>-coltext = <fcat>-scrtext_l.
        endif.
        <fcat>-seltext = <fcat>-coltext.
      endloop.
    So the work around would be, you set all of the other heading text to blank. Like if you want the Medium text, set Short text as blank. If you want the long text, set both Short and Medium text to blank.
    * Will generate column heading from Long Text.
      lr_column = ir_columns->get_column( 'CONNID' ).   
      lr_column->set_short_text( '' ).
      lr_column->set_medium_text( '' ).
    Regards,
    Naimesh Patel

  • Lot short text

    friends,
        while recording UD for a lot in qa11, where do we give the short text for that lot..because i need to get the long text of a lot, but the indicator ltextkz in qals is not set to X for lots even long text is entered..but for that lot, short text does not exist..as both are dependent of each other, can anyone tell me how to give short text? or is there any way to get the long text even short text doesn't exist for a lot? thanks all

    by using SAVE_TEXT  u can maintain the Long texts for LOT.Objects u have to pass is given below.Or press F9 in QA11 it goes to text Editor.
    <b>Text Name       410000000105963L---->Lot Number
    Language        EN
    Text ID         QAVE Long text on usage decision
    Text object     QPRUEFLOS  Inspection lot texts</b>
    regards
    Prabhu

  • Upgrade to SCM7.0 DP info objects (Characteristics) long/short text issue

    Hi All,
    We have upgraded from SCM4x to SCM7.0. The info objects characteristics customized long and short text is not updated in SCM 7.0.
    Example: Info object 9ALOCNO standard long/short text is APO location. But in SCM4x they have changed to Plant. After upgrade this text is set to APO location, not the plant. Like this many chars text have been changed to SAP standard.
    When I try to change text of info object creates transport request.
    Is this standard behavour when we upgrade?
    Please share your thoughts and let me know for more information.
    Thanks,
    Sreeni

    Sreeni,
    With every upgrade the customization is lost. We will have to make a list of all customized objects and make the change again in the upgraded system.
    Hope this helps.
    Thanks
    Mani

  • Significance of Long and short text Objects

    Hi all,
    I want to know the difference between Long and short texts and scenarios in which long texts are better to use than short texts.

    long text used for more than 256 character store in db.
    long text example,
    mm01 t_code sales inform
    to save the long text call function `save_text`.
    short text.
    field Description

  • Text Type (short - long) in F4 selection help (web)

    How can I change the the text type (short - medium - long) in the F4 help for a variable on the web? Currently the short text is always displayed and I want to show the medium text.
    I had the idea the setting 'text type' (in rsa1\infoobject maintenance\ tab bex) is responsible for this, but changing this setting has no effect. I also tried to change this in the query designer (infobject properties \ display as), again without result.
    The query is based on an InfoSet.
    Thank you for your help!
    Kind regards
    Dirk

    Hi, you can try to change the transfer rules setting matching the medium text from the source system to the long text in the infoObject and then change the infoObject text properties. I have the same problem with the infoObject with only the short and medium description. In the F4 i can have only the short description.
    I hope it help
    Alberto

  • Field Short Text and long Text not displayed in SKA1 in Se17

    When try to extract chart of account data from SAP using Tcode se17 and table ska1. Short text and G/L acc long text are not displayed where as these are displayed when we use t code se16 and table ska1.
    My client want to use specifically se17 for extracting the data.

    Vineet,
    that's a joke isnt' it ?
    se17 is from SAP-Rel 2.1 or s.th.!
    all jokes aside - the inclusion of text table (here table skat - to table ska1) is only realized with transcations SE16 and SE16N.
    To program this inclusion to se17 is very costly - i think and a modification too!
    hope you can persuade your client
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=iwo3sshliihvcradiegqaw%3d%3d">andreas Mann</a>

  • Creation of short text and long text?

    Hi,
    We create short text by using oe_fnd_attachments_pub.create_short_text_document and oe_fnd_attachments_pub.add_attachment API and to create long text we use fnd_documents_pkg.insert_row .
    Why is it that we have different approaches for creation of short text and long text?
    I know that oe_fnd_attachments_pub.add_attachment is used to attach a short text to some entity,but then why we dont do the same for long text?
    Please lemme knw urgently ...
    Thanks and Regards
    Amar

    Thanks for the help,
    I looked into the document and i got to know few things as to how short and long text are created, but can u tell when the records are inserted into fnd_attached_documents, because i can see that records are inserted into fnd_attached_short_text and fnd_attached_long_text, fnd_documents but i dont see any insertion into fnd_attached_documents, can u lemme knw how and when it is done?

  • GL short text/ long text

    Hi guys,
    Is it possible to display both GL short text and GL long text while performing transactions.
    Normally the long text is only displayed.
    Is it also possible to display the short text.
    Thanks,
    Srikanth.

    hi
    standard SAP does not have this functionality

  • CATS Short Text & Long Text

    Hello Experts,
    How are "Short Text" and "Long text" used in CATS? I thought that these were supposed to be two separate text fields, but when I make an entry in the Long text field, the value shows up in the Short Text field.
    Are these two separate fields? Any ideas how to use both Short Text and Long text and not have the value copied from one to the other?

    Hi,
    You can Create a rule in Alert Configuration based on the <b>error code</b> under "where did the error occur".
    Based on this you can trigger the required Alert category.

  • Difference betwen short text and long text

    Hi,
    what is the difference between short text, long text and variant.

    Hi,
    Short text is the short description you give for an object or field simlarly long text is the long description for a object or field.
    Short text cannot have lenght more than 20 and long text more than 60.
    Variant means for example if you give certain values as an input in one of your transaction for testing and you want the same values to be used every time you test in that particular screen, then instead of inputting the values again n again you call the variant.
    Hope this helps
    Assign points if useful
    Regards,
    venkat

Maybe you are looking for