Skip to Content
avatar image
Former Member

filling a textedit ui through an internal table

Hi

In our app we have created a textview ui element to show the contents of an itenral table of type TP1002.

Our problem lies with the new line . The question is how to copy the internal table to the textview to reflect

the structure of each new line.

We tried to use seprate by cl_abap_char_utilities=>newline did also fail to do the trick

Thank you for your help

yuval

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Sep 17, 2010 at 02:12 AM

    It should be noted that PT1002 also contains formatting information ( (dependent on the subtype of the 1002 infotype being queried) So that just looping at the contents and concatenating each TLINE component with a linefeed does not reflect the way that the information would be displayed using standard GUI rendering.

    I am assuming that you are looking at HR object descriptions? and it was just a typeo to say TP1002 - I can't imagine why anyone would call a table tp1002 otherwise!

    Using the linefeed construct should work!

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 16, 2010 at 12:12 PM

    From the online help:

    The attribute to be bound can be of type STRING or STRING_TABLE. With STRING_TABLE rows from TextEdit are stored as table rows. A line break is always stored as a line feed in a STRING (CL_ABAP_CHAR_UTILITIES=>NEWLINE, ASCII decimal 10). The Web Dynpro framework carries out the conversion for the client platform.

    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/45ee412e5e6324e10000000a1550b0/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

    • As they help says it can access type STRING or STRING_TABLE. I don't know what TP0001 is but I'm guessing its not a STRING_TABLE. If you have table of a different type, people generally loop through the table and concatenate each line together into a single string.

  • Sep 17, 2010 at 05:26 AM

    Perhaps this is the issue:

    >the question is how to copy the internal table to the textview ...

    To show multiline text you'll need to be using a text edit UI element (with read only flag checked) not a text view UI element.

    Possibly your first post was just a typo - because the post subject mentions textedit...

    Chris

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 20, 2010 at 11:36 AM

    Hello Perry,

    Can you try using CL_ABAP_CHAR_UTILITIES=>CR_LF instead of cl_abap_char_utilities=>newline.

    Best regards,

    Chinnu

    Sorry, did not read the full chain before replying...

    Edited by: Chinnu on Sep 20, 2010 1:39 PM

    Add comment
    10|10000 characters needed characters exceeded