Skip to Content

Extract/Display specific text within long text from a PM Task List

Hi All,

I have a requirement whereby I need to extract specific text/words within long text.

I have a PM Task List and within the header and operation there are specific instructions that the artisan needs to complete. However I only want certain sections/sentences to be printed i.e. there are sections that contain a NOTE, CAUTION and WARNING.. I only want those to print.. I was thinking of creating a custom paragraph format and assigning those instructions to the custom format and then trying to extract those.. This text will be printed on a job card for the artisan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 17 at 03:06 PM

    Hi Ameet,

    I hope I understand your task.

    1. Via help of function READ_TEXT you can get the text in an internal table. Here you can extract the specific text ( using custom paragraph format is a good idea).

    2. If you use .g. Smartforms to display the job card you can use e.g. dynamic text type to display the text

    or in case Sapscript you can modify your print program and call the textelement.


    Best regards, Hedvig

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 17 at 05:00 PM

    As Hedvig mentions, you can achieve this with SAPScript Functions.

    See FM "READ_MULTIPLE_TEXTS" (Cfr. SAP-KBA 2261311) that is able to use Ranges and Wildcards. I suggest you can test if you can use Wildcards OR get As much Content as you would possibly want, and then use A RegEx to search for Specific Words ...

    Add comment
    10|10000 characters needed characters exceeded