Skip to Content
One of our Project requirements was to display a long text of statements which are stored in SAP table as a collection of rows /records, we were finding it difficult in having formatted text in terms of paragraphs, line breaks, carriage returns, Hence we made some analysis on our part, which we present to the community for a review

option 1 – The long text in sap table was in single column with multiple rows in terms of having each line as one record and when displayed looks like a paragraph statement. So I used a RFC call from SAP and made a binding with a webdynpro table to populate the rows and made invisible the row/column lines. So When you run it on the browser it will display like a long text. By default, SAP table will have column some length of 72 characters, which I changed to 140 charcs( through another rfc which takes care of the carriage returns,formatting..etc), to get a long sentence formation.

option 2 – If the long text is not from SAP table and its kind of direct information, then just keep on pasting the text in the text view by providing spaces appropriately, so that the display will be a continous form of paragraph. This is a trial and error way and providing the spaces between the lines.

option 3 – Store the long text in a text file and call a import parameter, which will read the whole text and store it in string (node) and display it text view. ( alignment cannot be gauranteed – not a good option)

option 4 – Last one, is to call a office (msword) or a pdf control , which will display the long text through the word editor or a pdf form.

Hence in conclusion, we found 4 different options to tackle this requirement. Hope it helps you too !

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Mattias Johansson
    Hi,

    We’ve had similar requirements, and another option is to store the text in KM and retrieve it from there.

    The two solutions we came up with, depending on what requirements you have on formatting, is to either store the content as an html page and show it in an iFrame in the web dynpro application, or read it as a resource and add it to a text view.

    Regards
    Mattias

    (0) 
  2. Geert Engelhardt
    Hi!

    I want to mention TextEdit UIElement. In TextEdit you may use Java formating notation like \n \t etc.

    You just need to implement a few lines of code to get the export table lines of the rfc into proper lines of text in the edit box…

    greets
    Stefan

    (0) 
  3. Geert Engelhardt
    Hi!

    I want to mention TextEdit UIElement. In TextEdit you may use Java formating notation like \n \t etc.

    You just need to implement a few lines of code to get the export table lines of the rfc into proper lines of text in the edit box…

    greets
    Stefan

    (0) 

Leave a Reply