Skip to Content
author's profile photo Former Member
Former Member

Read text in Smartform

Hi,

I am working on a change to a Smartform and I need to restrict the text in an include text. I can't find a way to change the Include text so I have been trying to use the function module 'READ_TEXT' even though everywhere I've looked says that this should be done in an include text.

I was just wondering whether READ_TEXT actually works in Smartforms or if there is another way to manipulate the text from include texts.

FYI I want to take the first x number of characters from the include text because any more won't fit on the form.

Thank you!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 02, 2014 at 02:57 PM

    Lee,

    You can use READ_TEXT in the initialization part and read the text then pull out x no.of characters from it. Create a global data variable and assign the value to it and display it in the smartform.

    Thanks,

    Naga.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your helpful reply.

      I used the READ_TEXT in the initialization part which worked fine, but then I realised that I actually needed it in the 'Main' window as I needed to use it for a table of item description texts, and then I used the code within the main window node, and it seems to work now. I'm not sure what I did differently to how I tried it the first time though.

      Thank you very much.

  • Posted on Jan 02, 2014 at 03:57 PM

    Hi Lee,

    You should read the text into with read_text and after it create a node with a dynamic textnode, where you link your table. But please, do not handle that with a loop or a do node. That isn't a good way to solve problems like yours.

    The table has to be type TLINE.

    If you need help to implement the dynamic text, please check the official Helpsite. There is a good explaination how to use that.

    If you are able to read the text in the driver program do it there and pass it to the interface. It is much easier to debug and manipulate while working with normal breakpoints and stuff like that.

    Here i found a step by step tutorial for that:

    Dynamic texts in smart form

    Regards

    Florian

    PS: Questions to Smartforms or Sapscript are better posted in Space Output Management

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.