CONVERT_RTF_TO_ITF execuion

hello guru's,
      Can someone tell me how to execute the FM CONVERT_RTF_TO_ITF.
Thanking in advance.
Vikr@m

hello guru's,
      Can someone tell me how to execute the FM CONVERT_RTF_TO_ITF.
Thanking in advance.
Vikr@m

Similar Messages

  • Conversion Error in CONVERT_RTF_TO_ITF

    Dear all,
    I´m using FM CONVERT_RTF_TO_ITF to convert contents of an .rtf document to SapScript format. This basically works fine. Since the customer is based in Austria, there is a need to convert german special characters in the text as well (ä, ö, ü, ß).
    This works for some characters, but not for all. I do get some incorrect results, that actually look like chinese characters. Here´s an excerpt of the result of a conversion
    << looking good >>
    Ich habe soeben erfahren, dass sich die Flughafensteuern für Ihr Ticket
    nach ... erhöht haben.
    << /looking good >>
    << looking not so good >>
    Die anfallenden Geb&#40680;ren (Flughafensteuern) werden von der jeweiligen
    Fluglinie an die einnahmeberechtigte Stelle zB. Flughafen AG abgegeben.
    F&#40693; die Berechnung ist der Kurswechsel am jeweiligen Tag
    ausschlaggebend, da die Betr&#37585;e in der jeweiligen Landesw&#37586;rung
    anfallen. Daher k&#39946;nen sich die Taxen ver&#37592;dern, wenn das Ticket nicht
    am Tag der Buchung ausgestellt wird.
    << /looking not so good >>
    I tried to debug into form import_rtf (subsequently called by FM CONVERT_RTF_TO_ITF) but didn´t get any hints on where the error occurs.
    I kind of think that it may be a problem linked to our systems codepage, since we are running a unicode database and i found a line of coding, that looks suspicious to me in form import_rtf (include LSTXKFRI, line 19)
      ascii_codepage = 1133.           " empirisch, bis genau bekannt
    Any ideas?
    Thanks a lot & Regards
    Christoph

    Just in case somebody´s interested! I found that the source .rtf files we were trying to convert were not valid .rtf, at least in the way SAP sees it.
    We removed some of the formating information, then the FUBA was able to parse the code directly.
    Thanx anyway & Kind regards
    Christoph

  • Sample code CONVERT_RTF_TO_ITF

    hi Guys.
    I have a requirement that I need to upload RTF file in to SAP Script format. For that I am using the FM CONVERT_RTF_TO_ITF I donu2019t know how to use it .
    Can you please provide me sample code and sample data what data needs to pass to FM.  After some analysis I have observed the below points.
    1.     RTF should be converted into RAW data (HEXA)
    2.     RAW data needs to pass FM CONVERT_RTF_TO_ITF
    I tried by above steps but no luck. plz do need full. 
    ~YSR
    Moderator Message: No Sample codes will be provided here. First construct a code of your own. If you have any issues with it, post the relevant portions here and ask for clarifications.
    Edited by: kishan P on May 19, 2011 12:29 PM

    Hi,
    <<removed by moderator>>
    checkout this,may help u..
    regards.
    Edited by: kishan P on May 19, 2011 12:29 PM

  • CONVERT_RTF_TO_ITF

    Hi experts ,
    Can any one give the code for executing the Function Module CONVERT_RTF_TO_ITF.

    Hi experts ,
    Can any one give the code for executing the Function Module CONVERT_RTF_TO_ITF.

  • Alv back ground execuion

    Hi,
    I want to run ALV in back ground.
    I have two check boxes in selection screen.
    One is for back griund execution and another is for direct execution.
    There will be data base updation if i run in back groud or direct execution.
    So how can i run program in back ground if click the check box.
    Rgds,
    Sunil.K

    When you are running the program in background, the default value of the checkbox should be X or you should create a varaint by clicking the checkbox. Then you need to schedule a background job with that variant. Database updation will happoen even if you schedule it in background.
    I hope it solves your problem, if not please revert.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Index usage for retrieving data  without filter predicate

    Hi,
    does someone have a explanation for the following scenario:
    I have a table T1 with an index OID_IX on column ( object_id ) - The table is a CTAS from dba_objects just to populate it with data.
    There are no other Indexes present. The table and the index are analyzed !
    When I run the following query the table is accessed FULL ( not using the index )
    SELECT OBJECT_ID FROM T1;
    SQL> select object_id from t1;
    485984 rows selected.
    Elapsed: 00:00:01.76
    Execution Plan
    Plan hash value: 3617692013
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 485K| 2372K| 1528 (1)| 00:00:19 |
    | 1 | TABLE ACCESS FULL| T1 | 485K| 2372K| 1528 (1)| 00:00:19 |
    Statistics
    1 recursive calls
    0 db block gets
    7396 consistent gets
    0 physical reads
    0 redo size
    2887158 bytes sent via SQL*Net to client
    5684 bytes received via SQL*Net from client
    487 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    485984 rows processed
    But if I add a predicate ( even though it is useless in this case ) the index is taken and the query runs faster:
    JDBC@toekb> select object_id from t1 where object_id != -999;
    485960 rows selected.
    Elapsed: 00:00:01.40
    Execution Plan
    Plan hash value: 3555700789
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 485K| 2372K| 242 (3)| 00:00:03 |
    |* 1 | INDEX FAST FULL SCAN| OID_IX | 485K| 2372K| 242 (3)| 00:00:03 |
    Predicate Information (identified by operation id):
    1 - filter("OBJECT_ID"<>(-999))
    Statistics
    1 recursive calls
    0 db block gets
    1571 consistent gets
    0 physical reads
    0 redo size
    2766124 bytes sent via SQL*Net to client
    5684 bytes received via SQL*Net from client
    487 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    485960 rows processed
    here my setup:
    sqlsql--
    drop table t1 purge ;
    create table t1 tablespace users as select * from dba_objects;
    insert into t1 ( select * from t1);
    commit;
    insert into t1 ( select * from t1);
    commit;
    insert into t1 ( select * from t1);
    commit;
    create index oid_ix on t1 (object_id) tablespace users ;
    exec dbms_stats.gather_table_stats(null,'t1',cascade=>true, estimate_percent=>100);
    sqlsql--
    In my case the Table and Index looks this way:
    JDBC@toekb> select table_name, NUM_ROWS,BLOCKS,AVG_SPACE from user_tables;
    TABLE_NAME NUM_ROWS BLOCKS AVG_SPACE
    =======================================
    T1 485984 6944 0
    Elapsed: 00:00:00.11
    JDBC@toekb> select INDEX_NAME,BLEVEL,LEAF_BLOCKS,DISTINCT_KEYS,NUM_ROWS from user_indexes;
    INDEX_NAME BLEVEL LEAF_BLOCKS DISTINCT_KEYS NUM_ROWS
    ===================================================
    OID_IX 2 1074 60745 485960
    Elapsed: 00:00:00.07
    The table holds 7 times more blocks than the index !
    any reply welcome
    best regards
    Edited by: guenterp on Aug 12, 2010 2:44 PM

    guenterp wrote:
    Hi,
    does someone have a explanation for the following scenario:
    I have a table T1 with an index OID_IX on column ( object_id ) - The table is a CTAS from dba_objects just to populate it with data.
    There are no other Indexes present. The table and the index are analyzed !
    When I run the following query the table is accessed FULL ( not using the index )
    SELECT OBJECT_ID FROM T1;
    SQL> select object_id from t1;
    485984 rows selected.
    Elapsed: 00:00:01.76
    Execution Plan
    Plan hash value: 3617692013
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 485K| 2372K| 1528 (1)| 00:00:19 |
    | 1 | TABLE ACCESS FULL| T1 | 485K| 2372K| 1528 (1)| 00:00:19 |
    Statistics
    1 recursive calls
    0 db block gets
    7396 consistent gets
    0 physical reads
    0 redo size
    2887158 bytes sent via SQL*Net to client
    5684 bytes received via SQL*Net from client
    487 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    485984 rows processed
    But if I add a predicate ( even though it is useless in this case ) the index is taken and the query runs faster:
    JDBC@toekb> select object_id from t1 where object_id != -999;
    485960 rows selected.
    Elapsed: 00:00:01.40
    Execution Plan
    Plan hash value: 3555700789
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 485K| 2372K| 242 (3)| 00:00:03 |
    |* 1 | INDEX FAST FULL SCAN| OID_IX | 485K| 2372K| 242 (3)| 00:00:03 |
    Predicate Information (identified by operation id):
    1 - filter("OBJECT_ID"<>(-999))
    Statistics
    1 recursive calls
    0 db block gets
    1571 consistent gets
    0 physical reads
    0 redo size
    2766124 bytes sent via SQL*Net to client
    5684 bytes received via SQL*Net from client
    487 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    485960 rows processed
    here my setup:
    sqlsql--
    drop table t1 purge ;
    create table t1 tablespace users as select * from dba_objects;
    insert into t1 ( select * from t1);
    commit;
    insert into t1 ( select * from t1);
    commit;
    insert into t1 ( select * from t1);
    commit;
    create index oid_ix on t1 (object_id) tablespace users ;
    exec dbms_stats.gather_table_stats(null,'t1',cascade=>true, estimate_percent=>100);
    sqlsql--
    In my case the Table and Index looks this way:
    JDBC@toekb> select table_name, NUM_ROWS,BLOCKS,AVG_SPACE from user_tables;
    TABLE_NAME NUM_ROWS BLOCKS AVG_SPACE
    =======================================
    T1 485984 6944 0
    Elapsed: 00:00:00.11
    JDBC@toekb> select INDEX_NAME,BLEVEL,LEAF_BLOCKS,DISTINCT_KEYS,NUM_ROWS from user_indexes;
    INDEX_NAME BLEVEL LEAF_BLOCKS DISTINCT_KEYS NUM_ROWS
    ===================================================
    OID_IX 2 1074 60745 485960
    Elapsed: 00:00:00.07
    The table holds 7 times more blocks than the index !
    any reply welcome
    best regards
    Edited by: guenterp on Aug 12, 2010 2:44 PMSorry, but I am in doubt with your statists:
    Statistics
    1 recursive calls
    0 db block gets
    7396 consistent gets
    0 physical reads ---->>>>>>>>>>>> Why it is 0 in any case(bnoth full scan and index FFS)
    0 redo size
    2887158 bytes sent via SQL*Net to client
    5684 bytes received via SQL*Net from client
    487 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    485984 rows processedCould you pls retry below operation before execuion of each sql:
    alter system flush buffer_cache;In my case with 10.2.0.4 on HPUX:
    SQL> exec dbms_stats.gather_table_stats(null,'t1',cascade=>true, estimate_percent=>100);
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.61
    SQL> alter system flush buffer_cache;
    System altered.
    Elapsed: 00:00:14.00
    SQL> select * from t1;
    82016 rows selected.
    Elapsed: 00:00:06.48
    Execution Plan
    Plan hash value: 838529891
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      | 82016 |  6888K|   394   (1)| 00:00:05 |
    |   1 |  TABLE ACCESS FULL| T1   | 82016 |  6888K|   394   (1)| 00:00:05 |
    Statistics
              0  recursive calls
              0  db block gets
           6455  consistent gets
           1039  physical reads
              0  redo size
        3480570  bytes sent via SQL*Net to client
          38508  bytes received via SQL*Net from client
           5469  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          82016  rows processed
    SQL> alter system flush buffer_cache;
    System altered.
    Elapsed: 00:00:18.26
    SQL> select * from t1 where object_id !=999;
    81976 rows selected.
    Elapsed: 00:00:07.09
    Execution Plan
    Plan hash value: 838529891
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      | 81976 |  6884K|   394   (1)| 00:00:05 |
    |*  1 |  TABLE ACCESS FULL| T1   | 81976 |  6884K|   394   (1)| 00:00:05 |
    Predicate Information (identified by operation id):
       1 - filter("OBJECT_ID"<>999)
    Statistics
              0  recursive calls
              0  db block gets
           6443  consistent gets
           1039  physical reads
              0  redo size
        3478961  bytes sent via SQL*Net to client
          38494  bytes received via SQL*Net from client
           5467  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          81976  rows processed
    SQL>

  • Error while converting RTF to PDF

    Hi,
    I have got a requirement to convert .rtf file to .pdf file while downloading. The .rtf file is in application server. I have used the FM CONVERT_RTF_TO_ITF to convert to ITF format. After this I am using the FM CONVERT_OTF to convert it to pdf format. But in this step I m not getting the pdf format file. I am getting an exception 'ERR_BAD_OTF'. Is there any other step in between after converting to .itf format and convert_otf. Can any one please help me on this.
    Thanks & Regards,
    Rama.

    Hi,
    Use the FM's in the following order :
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = lc_formname
    IMPORTING
    fm_name = v_fm_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    CALL FUNCTION v_fm_name
    EXPORTING
    IMPORTING
    job_output_info = gt_job_output
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
    IMPORTING
    bin_filesize = v_bin_filesize
    TABLES
    otf = gt_job_output-otfdata

  • How to convert a Word document to text or html in an ABAP program

    Hi,
    At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
    The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
    Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
    I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
    I would appreciate any help very much.
    Thanks

    Ok, here's what I ended up doing:
    First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
        Transform data table from 132 character lines to
        256 character lines
          LOOP AT data_table INTO dataline.
            IF newrow = 'X'.
            Add row to new table
              APPEND INITIAL LINE TO xdatatab ASSIGNING .
              newrow = space.
            ENDIF.
          Convert the raw line of old table to characters
            ASSIGN dataline TO .
          Check line lengths to determine how to add the
          next line of old table
            newlinelen = STRLEN( newline ).
            ADD addspaces TO newlinelen.
            linepos = linemax - newlinelen.
            IF linepos > datalen.
            Enough space available in new table line for all of old table line
              newline+newlinelen = oldline.
              oldlinelen = STRLEN( oldline ).
              addspaces = datalen - oldlinelen.
              CONTINUE.
            ELSE.
            Fill up new table line
              newline+newlinelen(linepos) = oldline(linepos).
              ASSIGN newline TO .
              newrow = 'X'.
            Save the remainder of old table to the new table line
              IF linepos < datalen.
                oldlinelen = STRLEN( oldline ).
                addspaces = datalen - oldlinelen.
                CLEAR newline.
                newline = oldline+linepos.
              ELSE.
                CLEAR newline.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Write the last line to the table
          IF newrow = 'X'.
            APPEND INITIAL LINE TO xdatatab ASSIGNING .
    Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
        Convert the RTF format to SAPScript
          CALL FUNCTION 'CONVERT_RTF_TO_ITF'
            EXPORTING
              header            = dochead
              x_datatab         = xdatatab
              x_size            = xsize
            IMPORTING
              with_tab_e        = withtab
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              missing_size      = 2
              OTHERS            = 4.
    This returns the document still containing the mail merge fields which needs to be filled in:
          LOOP AT itf_table INTO itf_line.
            WHILE itf_line CS '«'.
              startpos = sy-fdpos + 1.
              IF itf_line CS '»'.
                tokenlength = sy-fdpos - startpos.
              ENDIF.
              token = itf_line+startpos(tokenlength).
              REPLACE '_' IN token WITH '-'.
              ASSIGN (token) TO .
              ENDIF.
              MODIFY itf_table FROM itf_line.
            ENDWHILE.
          ENDLOOP.
    And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
        Convert document to 60 char wide ascii document for emailing
          CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
            EXPORTING
              formatwidth       = 60
            IMPORTING
              c_datatab         = asciidoctab
              x_size            = documentsize
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              OTHERS            = 2.
    And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body.

  • How to download and convert RTF/DOC file in DMS into PDF file

    Hello.
    We're on ECC6.0. We have a requirement to get the *.doc or *.rtf file checked in DMS, convert it to pdf format and download it as *.pdf file. The document data is stored in DRAO-ORBLK (LRAW data type). Has anyone programmatically done this? What is the process to achieve this? I've read in the forum that you should first convert RTF(.doc) data to OTF format using CONVERT_RTF_TO_ITF and then you will get the script format from rtf data. Generate the spool using the script data. Convert the spool to PDF using CONVERT_OTFSPOOLJOB_2_PDF. However, the fm CONVERT_RTF_TO_ITF uses RAW data type. There's also fm CONVERT_OTF_2_PDF but I don't know how to implement this for my purpose.
    Also, if Adobe Distiller is installed on the SAP application server, can it be used from an ABAP pgm?
    Thanks in advance for your inputs.

    Hi Maria,
    I realize this a rather old post, but was wondering if you managed to do this as I am having a similar requirement. Appreciate if you could share any solution or findings.
    Thanks,
    Lashan

  • BAPI Execution Error

    HI,
    I have a screen for searching the values by either by first name or by last name.I have 2 buttions GO and EXIT.When I input some text in the search criteria in the first name or last name and click GO,its returning the necessary records.EXIT button will close the indow.
    My Problem:-
    I put * as the search criteria and click GO.
    Its returning corrct value(20 records).
    Without clicking EXIT,when I click GO again,its returning 40 records and the multiple time I click GO,that many number of times the record is displayed in the table.
    I am execuion the BAPI onActionGo();
    Similarly If I write PITT as search createria and click GO,its returning 1 recorord.Similarly if I click 5 times ,5 PITT record is coming.Now if I put * as search criteria and click GO 6th time its returning 6*20=120 records.Now if I put PITT in the search criteria and click GO 7th time,PITT is coming 7times.
    I invalidate the node instance before execution  and after execution of the BAPI.Still its getting reflected.
    Basically the problem is,as many times as I am Clicking GO,that many times its returning the search criteria value.
    PLease suggest.Its a bit issue for me.
    Regards
    -Sandip

    Hi,
    the table is bind with rfc node or value node ?
    if it is value node do the following each time you executing the rfc
    wdContext.node<Value node name>().invalidate();
    or it is directly bind with rfc node
    make sure ,in component controller execute method of the rfc have the following statement.
    wdContext.node<rfc output node name>().invalidate();
    Regards,
    ramesh

  • Block an extension from another extension

    Hi i am new to mac os development in general.But i got some exposure to javascript and html. 
    My requirement is this, say if there is an extension in safari already running and user now installs my extension. Can my extension block the execuion of the the other extension running?
    Or first of all is it possible to get the list of all extensions running?
    Lets make it more specific to Mac, m not interested in any other platform now.
    thanks in advance.

    So if i install an online security software.
    Don't EVER do that. 99.9% of such software is pure malware that can cause you a lot of grief and/or a rip-off that will you money, or both.
    You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful:
    https://discussions.apple.com/docs/DOC-2435

Maybe you are looking for