Problem viewing text in long text field

Hi,
I have a long text in the screen and it takes 65 characters per line in the long text field. iam able to populate data in the long text field but the text in the long text field is truncating in between the words as shown below.
SAP Business One users can access and ru
n reports by using the UI API provided as
part of the SAP Business One SDK and the
Crystal Reports .Net Winform viewer. Rea
d the new ---
Could any one suggest how to rectify this, my requirement is to end the lines at spaces like
SAP Business One users can access and run
reports by using the UI API provided as
part of the SAP Business One SDK and the
Crystal Reports .Net Winform viewer. Read
the new ---
Appriciate your time.
Reward points for useful answer.
Thanks,
Sreeni.

here is how I would do it:
1) convert the input (short text) table to string
2) apply this code to the string:
DATA: lv_text TYPE text40,
          lv_length TYPE i.
WHILE lv_string IS NOT INITIAL.
  lv_length = 39.
  lv_text = lv_string.
  WHILE lv_text+lv_length(1) NE space AND lv_length GE 0.
       lv_text = lv_text(lv_length).
       lv_length = lv_length - 1.
  ENDWHILE.
  IF lv_length GE 0.
     APPEND lv_text TO lt_short_text.
  ENDIF.
   lv_length = lv_length + 1.
   SHIFT lv_string LEFT BY lv_length PLACES.
ENDWHILE.

Similar Messages

  • Problem in formatting of long text -- line break not recognized.

    Hi ,
    We have a PO smartform in our SRM system and we are facing problem with formatting of long text on the smartform for long texts maintained for the PO.
    for ex, we maintain the long text as --
    "this is long text for item 1.
    1. this is line 1.
    2. this is line 2."
    On the smartform it is displayed as --
    this is long text for item 1. 1. this is line 1. 2. this is line 2.
    So basically, the line breaks in the text are not considered in the smartform .
    Any suggestions on how to fix this issue ??
    Thanks.

    Hello Harmeet,
    Which Std. FM are you using to fetch the PO texts? If the PO doesn't exist in your system, i'm afraid you cannot use Include Texts as mentioned by Harsh.
    As an alternative you'll have to create a table & pass the text lines to it! I don't think SmartForms are not smart enough to identify new-line character.
    BR,
    Suhas

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

  • 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

  • Open iview url in WDA main view (below some long text)

    Hi Experts,
    My WDA first page is divided into 2 parts top & bottom.
    The top will have some text and bottom will have a display areas to display the portal iview. (Display means open iview directly on opening the first page of the application without any action)
    Eg: when you open the WDA in IE it will display some text in top & google webiste opened below that long text.
    I tried putting the google url in iframe source in main view but it didnt displayed it. only a blank area came displayed which was of iframe size.
    Hope i explained my requirement.
    Regards,
    Nik

    Hi Nikhil,
    Your requirement is clear, but displaying google page where did you write the code.
    Write your code in the View or component controller->WDINIT method, then first this method will display without any action.
    In the Layout you can divide into two parts one is for text another one is for the google site display.
    Let me know if you are not able to fix the issue still...send me the code I will let you know where is an issue.
    Regards,
    Naresh.

  • Problem in Reading  Material Long text in Sapscript

    Dear firends,
    I have written  following code in sapscrit to fetch the longtext of the material
    INCLUDE &MARA-MATNR(K)& OBJECT MATERIAL ID GURN LANGUAGE &NAST-SPRAS&
    Test name - material no(MARA-MATNR)
    object - MATERIAL
    text id - GURN
    LANGUAGE - EN
    but i am not table read the longtext by using above code, when i see in debug mode  ,i am getting warning message
    "data is not available for materil 0000013,GURN,MATERIAL" like that.
    i don't find any problem in code , long text also availble for material 0000013.
    i don't where is the problem , please give me solve this issue.
    Regards,
    D.prabhu

    Hi
    You have to fetch this Long text of this Material using READ_TEXT fun module by passing the 4 parameters as mentioned by you  by writing some code in the program or by writing the external subroutine using PERFORM statement
    Only Application HEADER and ITEM texts can be included in script using the INCLUDE command
    So write the code for the Read _Text fun module and fetch it into Internal table lines and pass/print those to script
    pass the same 4 parameters
    Test name - material no(MARA-MATNR)
    object - MATERIAL
    text id - GURN
    LANGUAGE - EN
    see the sample code
    data:begin of it_stxh occurs 0,
            tdobject type tdobject,
            tdname type tdobname,
            tdid type tdid,
            tdspras type spras,
          end of it_stxh.
    types:begin of ty_lines.
            include structure tline.
    types:end of ty_lines.
    data:it_lines type standard table of ty_lines with header line.
    it_stxh-tdid = 'GRUN'.
    it_stxh-tdspras = 'E'.
    it_stxh-tdobject = itab-matnr.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        ID                            = it_stxh-tdid
        LANGUAGE                      = it_stxh-tdspras
        NAME                          = it_stxh-tdname
        OBJECT                        =  it_stxh-tdobject
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      TABLES
        LINES                         = it_lines
    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 eq  0.
    loop at it_lines.
    < Print these lines in script by passing to script>
    endloop.
    ENDIF.
    Regards
    Anji

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

  • Dynamic text in Long text of message

    Hi All
    Can you please guide me that how dynamic text are maintained in long text of the messages.
    I have used variable name between 2 ampersands 1.e. &var&..but its nt working. Where could be the mistake ?
    Regards,
    Shreya

    The problem is... I want to show an error message. and when user double clicks on that message, a pop up screen should come showing the detailed description of that message which also contains some dynamic text...eg:
    The message is "Please maintain ABC field for Company Code &1".
    To this short text i want to give a long text description eg:
    "For the Combination of Compay Code &2 and Account &3, ABC field should not be blank".
    Dynamic text element in short text is working fine,  but in long text it is showing &2 and &3..,, ie these are not populated with values.
    Where could be the mistake ?

  • Supplementary text VS long text (PMD)

    Hi,
    Does someone know the difference/advantages of using these document elements in PMDs? They have the same look and feel but the long text "apparently" is not supported.
    I was wondering when this has been incorporated due the lack of documentation about them Parameterizable Documentation Basics - Extended Basic Data - SAP Library
    Regards

    Long texts (the oldoriginal ones, type L) have a restricted content size (112 lines with 72 characters each) and have some issues when it comes to storing and printing text that contains line breaks. To remediate these problems, extended texts (type T) were introduced with 4.72 (for use outside of tabular structures) / 6.00. These fields are stored differently, have virtually no size restriction and preserve line breaks. For new documents, you should always use type T. Be aware that you need to use generator version 2 for this, the new texts won't work with generator version 1 (which is no longer supported anyway).

  • ORG UNIT TEXT Datasource (Long Text)

    Hi All !
    In RSA6, for the datasource 0ORGUNIT_TEXT, I can see short & medium text. But when checked the extractor structure ROTEXTSTR1, there I can see all the three text short, medium & long text. Requirement is to bring long text from the ECC. How to bring the long text from the extractor structure in the Datasource?
    With Regards
    Reks

    Check in the Table ROOSFILED , you can see the field long text (TXTLG) --  the object selection is set to 'A'
    where A -  Field in OLTP and BW Hidden by SAP.
    Try to change the entry of selection to X and activate the entry in the table.
    Where X - Selection Adjustable, Visibility Set.
    Hope this helps...

  • 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

  • XI Alert Text (Modifyinng long text using BADI ALERT_MODIFY_TEXT)

    Hello, Has anyone been able to successfully implement the BADI ALERT_MODIFY_TEXT ? 
    The export parameters of the BADI contains an internal table called CT_LONG_TEXT which I am updating with a simple "hello world" message.   However, I cannot see this text inside the long-text field in me Alert Inbox in the RWB.
    I am certain that the badi is being invoked (I am inserting an entry to a custom table to ensure that - and also, I have written out the original contents of CT_LONG_TEXT  which contains the original long text which I configured in ALRTCATDEF), however, no changes to the CT_LONG_TEXT seems to go through..
    Is there anything else I need to do?  In my ALRTCATDEF config, I have also tried to use the "Dynamic Text" option but to no avail.
    Thanks in advance for your help.

    Post Author: RScipione
    CA Forum: Performance Management and Dashboards
    I'll reply to my own post so that others might benefit from the response I got from customer support.
    It is possible to use functions in alert text, but the function must be preceeded by #f and followed by %.  So to get the example from my previous post working, I used:
    #f MetricValue(metric1.id, 0) %
    The 'f' is case sensitive by the way.

  • Short Text and Long Text for WBS

    HI All,
    I am working on Interface Project where I need to enter Short description and long text for a WBS with external text.
    Let me know if any FM Module is exist for same where I can Put this Short Description and Long Text seprately for a WBS Element.
    Regards,
    Atul R. Rajmane

    Hi Atul,
    I think you can enter short description & long text seprately for a WBS while creating entire struture of project in PS only. I don't think other than PS you will be able to enter short & long text for individual WBS.
    Regards,
    Sandeep

  • Adding standard Text as long text in QC01 of General data Section

    Hi ,
    I want to Append standard text in Certificate Profile Creation(QC01)of General data section. Can you suggest any Exit.
    Standard Texts created by SO10 Transaction.
          Thanks in advance

    Dear Raynard,
    Raynard Coscolluela wrote:
    As far as I can remember the Travel Request was conceptualize to be a simple ESS Form that's why most of the labels here are hard coded and didn't use OTR.
    I have to disagree. None of the labels, except this one are hard-coded via Personalization-Means and most Texts come indeed from the OTR, the Label T_ACTYPE_LABEL also has an entry in OTR (see my posts above) but is only non-changable by enhancements because the component configuration was "abused" to overload the OTR and coding in runtime. I still can't really believe this one is intentional....
    Raynard Coscolluela wrote:
    We don't recommend changing the label text in Web Portal as it can lead into inconsistency incase a new update will be > deliver by SAP into this fields. So yes this is a consider a modification.
    This will be an issue since the word "Spesen" which is a specific German one for "Expenses" is juridically wrong if used within a specific MOREI of the Public Sector. But this is another issue and I don't want to elaborate on this one here.
    Raynard Coscolluela wrote:
    My colleague who participate in this thread is still on vacation and she ask me to assist here.
    I see, and I'm glad you did assist here. Give Sally my regards.
    This one is answered then, if not really "solved". I'll close the OSS message now.
    thanks a lot and best regards,
    Lukas

  • Problem in viewing long text in QP03

    Hi
        Facing a strange problem while trying to upload long text in QP01 using SAVE_TEXT.
    the long text is getting uploaded properly
    an entry is inserted in STXH with object, id, name, etc.
    but when i try to view the long text in QP03 txn. (Display), there is no icon for view long text
    when i go back to QP02 in change mode, the icon for long text (Create long text without horizontal lines embedded on it) exists, after clicking it am able to see the long text and if i am saving the plan while leaving the txn, then again if i see the same plan in display mode (QP03), i am able to see the long text icon and the long text by clicking it..if and only if i view manually every long text in QP02 and save while coming out the txn., I am able to see the long text icon and the long text in QP03.
    Is it any setting problem or where am i wrong?
    Sathish. R

    hi
       r u sure? bcoz the program was running fine with long text viewable in QP03 all this time
    Sathish. R
    Message was edited by:
            Sathish

Maybe you are looking for