cancel
Showing results for 
Search instead for 
Did you mean: 

Removing The Formatting tags (<H>, <U> etc ) from the text being Read.

Former Member
0 Kudos

Hi,

I am using FM READ_TEXT to read the long texts realted to some data.

When i pass the the necessary keys I get the data in TDLINE parameter as

say :--> <H>Line No 1 for Header Text 4600000162</>

<H>Line No 2 for Header Text 4600000162</>

At the time of display the text is displayed as above only .

I dont want these formatting tags (<H>, <U> etc ) to be displayed.

How can i get rid of these tags.

I dont want to disturb the formating of the text bing maintained.

Could you please help.

Thanks

Accepted Solutions (0)

Answers (6)

Answers (6)

Clemenss
Active Contributor
0 Kudos

Hi Kokate,

please try FM CONVERT_ITF_TO_ASCII.

Regards,

Clemens

aidan_black
Active Contributor
0 Kudos

Hi,

Does it help to use the function module function module CONVERT_ITF_TO_ASCII to convert the ITF formatted data returned by READ_TEXT in table LINES? This should remove paragraph formatting etc.

Regards,

Aidan

aidan_black
Active Contributor
0 Kudos

Hi,

Does it help to use the function module function module CONVERT_ITF_TO_ASCII to convert the ITF formatted data returned by READ_TEXT in table LINES. This should remove paragraph formmating etc.

Regards,

Aidan

Former Member
0 Kudos

Hi,

Can you pls bebugg the code and check what is coming in TDLINE ?

It seems that the data is maintained like that in the data source.. you can also manually remove the these tages from the TDLINE ..

data: w_iang(1000) value '<H> Line No 1 for Header Text 4600000162'.
if w_iang+0(3) ca '<H>' or w_iang+0(3) ca '<U>'.
  REPLACE ALL OCCURRENCES OF '<H>' in w_iang WITH ''.
endif.

Former Member
0 Kudos

Hi Experts,

I am creating an internal Order through T-code KO01and i am entering WBS on the screen.

The Cutsomer is having some requirements that WBS of level = 3 (PRPS-STUFE) only should be used for creating internal orders.

Implicit enehancements are used for this purpose.

The problem is in this scenario:

1) User enters level 4 WBS at time of internal order creation....hence error is displayed..'Please enter level 3 WBS'.

2) The User then corrects the WBS and enters level 3 WBS .

3) Use then clicks 'Settlement Rule'...now here instead of having the settlement rule for the current WBS (level 3), the screen is showing the settlement rule/parameters of the level 4 WBS, which was enetered earlier.

Please note that in the implicit enhancement i am only showing the error message. I am not modifying any values or fields.

Below is code.

IF rec_prps-prart <> c_e.
                MESSAGE s606(zfi) DISPLAY LIKE c_e.
                LEAVE TO SCREEN sy-dynnr.
       ENDIF.

is anything going wrong when i am stooping the screen flow or is it something else.

Please provide your comments.

Former Member
0 Kudos

hi,

You can try the below option, just check. I think text is maintained directly in the text area, instead after clicking on TEXTS tab right side we can maintain the text, just double click on that , it will open a text editor similar to SAP SCRIPT screen. Here maintain your text and in command promt give it as <H>.

<H> test line.

Former Member
0 Kudos

Hi,

How are you displaying the text in the output?

Pls have a look on below example.. I hope it will help you.

DATA: BEGIN OF w_lines OCCURS 50.
                INCLUDE STRUCTURE tline.
DATA: END OF w_lines.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
     client                        = sy-mandt
      id                           = 'ZT11'
      language                     = 'E'
      name                         = w_name
      object                       = 'VBBK'
*     archive_handle               = 0
*     local_cat                    = ' '
    TABLES
      lines                        = w_lines
    EXCEPTIONS
     id                            = 1
     language                      = 2
     name                          = 3
     not_found                     = 4
     object                        = 5
     OTHERS                        = 6.

  IF w_lines1[] IS NOT INITIAL.
    APPEND LINES OF w_lines TO w_display-text.  ---- > here try to use the syntex as writen.
  ENDIF.

It might be possible that the whole text including TDFORMAT , is been passed into text.

Wud be clear for you?

Regs,

Lokesh.

Former Member
0 Kudos

Hi Lokesh ,

Still the text is being displayed like previous only.

The formatting identifiers are still reamaining.

Thanks

Former Member
0 Kudos

Hi Abhishek,

I don't think there are standard keywords or something to remove these tags.

You might have to manually modify whole text before passing it to printing.

Thanks,

Daya