Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Rich text Format File to be uploaded for Long text of general task(IA06)

Former Member
0 Kudos

Hi All,

I have a requirement in which i have to update the long text of general task list in transacion IA06 but the data to be uploaded is in the file wth extension RTF (Rich Text Format). So i need to update the long text by uploading the file with .rtf as extension.

If any one has worked on the similar requirment please share your view.

Thanks

Ank

1 REPLY 1

koolspy_ultimate
Active Contributor
0 Kudos

try this


REPORT YCMTESTE LINE-SIZE 255 MESSAGE-ID TD.

PARAMETERS:

TEXTNAME LIKE THEAD-TDNAME DEFAULT 'SAPSCRIPT-DRUCKERTEST',

FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\temp\'.

DATA: TEXTHEADER LIKE THEAD.

DATA: TEXTLINES LIKE TLINE OCCURS 100 WITH HEADER LINE.

CALL FUNCTION 'READ_TEXT'

EXPORTING NAME = TEXTNAME

LANGUAGE = SY-LANGU

OBJECT = 'TEXT'

ID = 'ST '

IMPORTING HEADER = TEXTHEADER

TABLES LINES = TEXTLINES

EXCEPTIONS OTHERS = 1.

CHECK SY-SUBRC = 0.

CALL FUNCTION 'EXPORT_TEXT'

EXPORTING CODEPAGE = '1133'

FILE = FILE

FORMATWIDTH = 132

FORMAT_TYPE = 'RTF'

HEADER = TEXTHEADER

SSHEET = ' '

WITH_TAB = ' '

TABLES ITF_LINES = TEXTLINES

EXCEPTIONS DOWNLOAD_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_WRITE_ERROR = 3.

CASE SY-SUBRC.

WHEN 0. MESSAGE S807 WITH FILE.

WHEN 1. MESSAGE E815 WITH FILE.

WHEN 2. MESSAGE E811 WITH FILE.

WHEN 3. MESSAGE E814 WITH FILE.

ENDCASE.

Reference: [http://help.sap.com/saphelp_sm32/helpdata/en/d6/0db7f3494511d182b70000e829fbfe/content.htm]

<removed by moderator>

Edited by: Thomas Zloch on May 16, 2011 10:08 AM