IBook converting periods on PDF formatted pages into question marks

Can someone tell me why iBook is converting periods on PDF formatted pages into question marks in the search function?

Graymatters1 wrote:
In this particular instance, we are having to build an ebook which utilizes iBook.
In case in matters, Apple doesn't accept pdf's for the ibookstore.
You might try different apps for producing the pdf and see if there is any difference.
But only Apple can change how iBooks behaves.  You can tell them about the problem at
http://www.apple.com/feedback

Similar Messages

  • How do I convert a large PDF (1000 pages) into excel?

    This does not seem to work.

    Did you try processing smaller numbers of pages? The application (or your computer) may not have the memory to do all the pages at one time. You could combine them together in Excel.
    Which version of Acrobat are you using?

  • How to convert Xstring to PDF format and send pdf to multiple user

    Hi to all
    can any one provide me saple code to convert Xstring to PDF format and send pdf to multiple user
    i have searched the SDN , but cant get any proper soulution.
    I shall be thankful to you for this.
    Regards
    Pavneet Rana

    Use function module 'SCMS_XSTRING_TO_BINARY' to convert from XString to a Binary table. Just like this:
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer          = lv_xstring_pdf
          append_to_table = ' '
        TABLES
          binary_tab      = lt_doc_content.
    To send the email in an OO way you should user class CA_SEND_REQUEST_BCS. Take a look to program BCS_EXAMPLE_6 or any of the test programs in package SBCOMS.

  • Export arabic character into csv file turns into question mark in sql dev

    Hi,
    I am trying to export a table's output that contains some arabic and english mixed data, when I try to export it in csv, all the arabic characters change into question mark (?) but the same export is working fine on .xls or .xlsx.
    Since we have to export a huge data and csv is much faster thar .xls, kindly let me know why it is happening and what is the solution for this.
    Well, we are on Oracle 11gR2 and Sql Dev is 3.1
    Appreciate your time and experience sharing.
    Regards.

    Hi,
    Since you say it works for xls but not csv, and the only applicable preference setting ( Tools|Preferences|Database|Utilities|Export|Encoding ) should apply to all export formats, I would imagine this is a bug. Especially if the encoding specified in Preferences is consistent with the client OS settings. I was not able to find any prior bug logged against the Export utility for this issue.
    I logged a bug for this:
    Bug 13993410 - FORUM: ARABIC CHARACTER ENCODING RESPECTED FOR XLS BUT NOT CSV
    Regards,
    Gary
    SQL Developer Team

  • Why are my dock applications turning into question marks after restarting my macbook pro?

    So i have had my new MBP with retina display for a few weeks now, and everytime I shutdown or restart the computer, I have a bunch of question marks in my dock instead of my application icons. The question marks still show the name of the application under them, and after I click them they turn back into the proper icon. I noticed that they are only applications I have installed myself off the internet. It never happens to the applcations that came with my macbook, or apps from the mac app store. I have not moved the location of the applications i installed, so i dont know why the computer is having trouble displaying the icons. I am new to the mac operating system and am wondering if I may not have installed these applications properly. The apps that are constatly turning into question marks include Bittorent, VLC Player, PS3 Media Server, Air VIdeo Server, and the Dolphin gamecube emulator. I have looked all over the internet but i cannot find a solution. Please Help!

    When they go grey, it means that they have lost the location of the application that they represent.
    If you put your mouse over each one, it will tell you what application it is that it has lost.
    Go to wherever you have that application stored, usually the applications folder, and drag the icon of the application down into the dock. A new icon is created for you.
    Repeat with the other two grey icons in the dock.
    To remove the grey icons, left click and hold while you drag the icon out of the dock and onto the desktop. Release the mouse button and the icon will disappear in a puff of smoke.

  • Convert payslip to PDF format  , for e-mailing to employees

    HI with respect to my previous post 'Salary slip delivery thru email'
    I have been able to send the email out in the html format. I want the employee to recieve the mail in the PDF format. I would like your assistance on this.
    Here is the code.
    tables: PV000,
    T549Q,
    PA0001,
    V_T514D,
    HRPY_RGDIR,
    PA0002,
    PA0105.
    data: begin of ITAB occurs 0,
    MTEXT(25) type C,
    PERNR like PA0001-PERNR,
    ABKRS like PA0001-ABKRS,
    ENAME like PA0001-ENAME,
    USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
    P_FORM like PC408 occurs 0 with header line,
    P_P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
    MY_MONTH type T549Q-PABRP,
    STR_MY_MONTH(2) type C,
    MY_YEAR type T549Q-PABRJ,
    STR_MY_YEAR(4) type C.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
    ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
    INDEX type I,
    end of P_INDEX.
    constants:
    begin of F__LTYPE, "type of line
    CMD like PC408-LTYPE value '/:', "command
    TXT like PC408-LTYPE value 's', "textline
    end of F__LTYPE.
    constants:
    begin of F__CMD, "commands
    NEWPAGE like PC408-LINDA value '<NEW-PAGE>',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    data: OBJBIN like SOLISTI1 occurs 10 with header line,
    DOCDATA like SODOCCHGI1,
    OBJTXT like SOLISTI1 occurs 10 with header line,
    OBJPACK like SOPCKLSTI1 occurs 1 with header line,
    RECLIST like SOMLRECI1 occurs 1 with header line,
    OBJHEAD like SOLISTI1 occurs 1 with header line.
    INITIALIZATION *
    initialization.
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    SELECTION SCREEN *
    selection-screen begin of block BL1.
    parameters: S_ABKRS like PV000-ABKRS obligatory default 'ZA'.
    parameters: S_PERMO like T549Q-PABRP obligatory default '02'.
    parameters: S_PABRP like T549Q-PABRP obligatory.
    parameters: S_PABRJ like T549Q-PABRJ obligatory.
    select-options: S_PERNR for PA0001-PERNR.
    select-options: S_ORGEH for PA0001-ORGEH.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default
    'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    AT SELECTION-SCREEN *
    at selection-screen.
    if SY-UCOMM ='ONLI'.
    if S_PABRP > 24 or S_PABRP < 1.
    message E999(YHR) with 'Improper Payroll Period'.
    endif.
    if S_PABRP > 9.
    MY_MONTH = S_PABRP - 10 + 1.
    STR_MY_MONTH = MY_MONTH.
    MY_YEAR = S_PABRJ + 1.
    STR_MY_YEAR = MY_YEAR.
    else.
    MY_MONTH = S_PABRP + 3.
    STR_MY_MONTH = MY_MONTH.
    MY_YEAR = S_PABRJ.
    STR_MY_YEAR = MY_YEAR.
    endif.
    modified by Coul
    if S_PERMO NE '2'.
    message E999(YHR) with 'Improper Payroll Period Parameters'.
    endif.
    MY_YEAR = S_PABRJ.
    STR_MY_YEAR = MY_YEAR.
    shift STR_MY_MONTH left deleting leading SPACE.
    shift STR_MY_MONTH right deleting trailing SPACE.
    translate STR_MY_MONTH using ' 0'.
    get payrol period first and last dates _ added by Coul
    SELECT SINGLE *
    FROM T549Q
    WHERE PERMO = S_PERMO "Period param.; 02 = semi-monthly
    AND PABRJ = S_PABRJ "Payroll period year
    AND PABRP = S_PABRP. "Payroll period no.
    W_BEGDA = T549Q-BEGDA.
    W_ENDDA = T549Q-ENDDA.
    concatenate STR_MY_YEAR STR_MY_MONTH '01' into W_BEGDA.
    call function 'HR_HCP_GET_LAST_DAY_OF_MONTH'
    exporting
    IM_DATE = W_BEGDA
    importing
    EX_DATE_IS_MONTHEND =
    EX_LAST_DAY_OF_MONTH = W_ENDDA.
    select PA0001PERNR PA0001ABKRS PA0001~ENAME
    into corresponding fields of table ITAB
    from PA0001
    join PA0000
    on PA0000PERNR eq PA0001PERNR
    join HRPY_RGDIR
    on PA0001PERNR eq HRPY_RGDIRPERNR
    where PA0001~PERNR in S_PERNR
    where PA0001~ORGEH in S_ORGEH
    and PA0001~ABKRS eq S_ABKRS
    and PA0000~STAT2 eq '3'
    and PA0001~ENDDA ge '99991231'
    and PA0001~PLANS ne '99999999'
    group by PA0001PERNR PA0001ABKRS PA0001~ENAME.
    if SY-SUBRC <> 0.
    message E999(YHR) with 'No record(s) found.'.
    endif.
    endif. "SY-UCOMM ='ONLI'
    START-OF-SELECTION *
    start-of-selection.
    write : / 'Payroll Area : ',S_ABKRS.
    write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR.
    write : / 'System Date : ', SY-DATUM.
    write : / 'System Time : ', SY-UZEIT.
    write : / 'User Name : ', SY-UNAME.
    write : / SY-ULINE.
    sort ITAB by PERNR.
    loop at ITAB.
    clear : P_INFO, P_P_FORM, P_FORM, P_INDEX, P_LIST, OBJBIN,
    DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
    refresh : P_P_FORM, P_FORM, P_INDEX, P_LIST, OBJBIN,
    OBJTXT, OBJPACK, RECLIST.
    select single *
    from HRPY_RGDIR
    where PERNR eq ITAB-PERNR
    and FPBEG ge W_BEGDA
    and FPEND le W_ENDDA
    and SRTZA eq 'A'.
    if SY-SUBRC = 0.
    call function 'GET_PAYSLIP'
    exporting
    EMPLOYEE_NUMBER = ITAB-PERNR
    SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
    PAYSLIP_VARIANT = PAY_VAR
    importing
    RETURN = RETURN
    P_INFO = P_INFO
    tables
    P_FORM = P_FORM.
    check RETURN is initial.
    loop at P_FORM
    where LINDA eq F__CMD-NEWPAGE
    and LTYPE eq F__LTYPE-CMD.
    P_INDEX-INDEX = SY-TABIX.
    append P_INDEX.
    endloop.
    P_IDX = 1.
    refresh P_P_FORM.
    append lines of P_FORM from P_IDX to P_INDEX-INDEX
    to P_P_FORM.
    P_IDX = P_INDEX-INDEX.
    export P_P_FORM to memory id '%%_P_FORM_%%'.
    export P_INFO to memory id '%%_P_INFO_%%'.
    submit RPCEDT_LIST_TO_MEMORY exporting list
    to memory and return.
    call function 'LIST_FROM_MEMORY'
    tables
    LISTOBJECT = P_LIST.
    call function 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    tables
    IN = P_LIST
    OUT = OBJBIN
    exceptions
    others = 1.
    OBJHEAD = 'Objhead'.
    append OBJHEAD.
    preparing subject
    concatenate W_ENDDA(6)
    ' Payslip-' ITAB-ENAME0(28) '(' ITAB-PERNR4(4) ')'
    into DOCDATA-OBJ_DESCR.
    DOCDATA-OBJ_NAME = 'Pay Slip'.
    DOCDATA-OBJ_LANGU = SY-LANGU.
    OBJTXT = 'Pay Slip.'.
    append OBJTXT.
    OBJTXT = DOCDATA-OBJ_DESCR.
    append OBJTXT.
    OBJTXT = 'Have a nice day.'.
    append OBJTXT.
    Write Packing List (Main)
    3 has been fixed because OBJTXT has fix three lines
    read table OBJTXT index 3.
    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
    clear OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = 3.
    OBJPACK-DOC_TYPE = 'RAW'.
    append OBJPACK.
    Create Message Attachment
    Write Packing List (Attachment)
    ATT_TYPE = 'ALI'.
    describe table OBJBIN lines TAB_LINES.
    read table OBJBIN index TAB_LINES.
    OBJPACK-DOC_SIZE =
    ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
    OBJPACK-TRANSF_BIN = 'X'.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = ATT_TYPE.
    OBJPACK-OBJ_NAME = 'ATTACHMENT'.
    OBJPACK-OBJ_DESCR = 'Payslip'.
    append OBJPACK.
    Create receiver list
    refresh RECLIST.
    clear RECLIST.
    select single *
    from PA0105
    where PERNR eq ITAB-PERNR
    and SUBTY eq 'MAIL'
    and SUBTY eq '0001'
    and USRID ne ''
    and PA0105~ENDDA ge '99991231'.
    if SY-SUBRC = 0.
    RECLIST-RECEIVER = PA0105-USRID.
    translate RECLIST-RECEIVER to lower case.
    ITAB-USRID_LONG = RECLIST-RECEIVER.
    RECLIST-REC_TYPE = 'U'.
    append RECLIST.
    Send the document
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    exporting
    DOCUMENT_DATA = DOCDATA
    PUT_IN_OUTBOX = 'X'
    PUT_IN_OUTBOX = ''
    COMMIT_WORK = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    tables
    PACKING_LIST = OBJPACK
    OBJECT_HEADER = OBJHEAD
    CONTENTS_BIN = OBJBIN
    CONTENTS_TXT = OBJTXT
    CONTENTS_HEX =
    OBJECT_PARA =
    OBJECT_PARB =
    RECEIVERS = RECLIST
    exceptions
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    others = 8.
    if SY-SUBRC <> 0.
    ITAB-MTEXT = 'Message Not Sent to : '.
    else.
    ITAB-MTEXT = 'Message Sent to : '.
    endif.
    else.
    ITAB-MTEXT = 'Message Not Sent to : '.
    endif.
    else. "SY-SUBRC Not = 0 HRPY_RGDIR
    ITAB-MTEXT = 'Payroll data not found : '.
    endif. " end of SY-SUBRC = 0. HRPY_RGDIR
    modify ITAB.
    endloop. "end loop at ITAB
    sort ITAB by MTEXT PERNR.
    loop at ITAB.
    at new MTEXT.
    uline.
    write : / ITAB-MTEXT color 4 intensified on.
    write : / 'Emp. Code' color 2 intensified on,
    12 'Emp. Name' color 2 intensified on,
    54 'Email ID' color 2 intensified on.
    endat.
    write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
    endloop.

    hi,
       You can send the list output to spool.
    print-on ...
    PERFORM REPORT_OUTPUT.
    print-off.
    From there, you can convert that to pdf.
    fm CONVERT_ABAPSPOOLJOB_2_PDF
    Getting that pdf conversion done, you can send thE same to mail..
    fm SO_NEW_DOCUMENT_ATT_SEND_API1
    Regards,
    Sailaja.

  • How to convert report to pdf format  after that I want to send on mail

    Hi
    Guru
    What is my requirement . I want put push button on output list of a normal report. When user click on mail push button, mail should go to customer mail id according to customer  no i gave input  for customer no in selection screen.
    For this I need what is function module (Code) for convert a report to pdf format and whats function module for send mail to customer.
    Plz help me out
    thanks
    Durgesh

    Hi ,
       I think this is helpful
      FM are used to convert pdf file and attachem.
    CONVERT_ABAPSPOOLJOB_2_PDF
    SO_DOCUMENT_SEND_API1
    *& Report  ZSPOOLTOPDF2                                                *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program can be run in background or online and a spool request *
    *& will still be created                                               *
    REPORT  zspooltopdf2.
    PARAMETER: p_email1 LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_sender LIKE somlreci1-receiver
                                        DEFAULT '[email protected]',
               p_delspl  AS CHECKBOX,
               p_online no-display.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i,
           w_spool_nr like sy-spono.
          %_print LIKE pri_params.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Write statement to represent report output. Spool request is created
    if write statement is executed in background. This could also be an
    ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      If p_online = 'X'.
      Processing performed when program calls itself when run online 
        gd_spool_nr = sy-spono.
        EXPORT gd_spool_nr TO MEMORY ID 'SPOOLTOPDF'.
        EXIT.
      endif.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
      ELSE.
        gd_spool_nr = sy-spono.
    If executed online, it submits a program to perform the write statements
    instructing it to create a spool request, this could be another program
    which just performs the write statements and then exports sy-spono
    to memory. But in this example it calls itself passing X to parameter
    p_online, which takes it down an alternative procesing path.
        submit ZSPOOLTOPDF2
               with p_online = 'X'
               to sap-spool
               spool parameters   %_print
              archive parameters %_print
               without spool dynpro
               and return.
      ENDIF.
    Get spool id from program called above
      IMPORT gd_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
      PERFORM convert_spool_to_pdf.
      PERFORM process_email.
      if p_delspl EQ 'X'.
        PERFORM delete_spool.
      endif.
      IF sy-sysid = c_dev.
        wait up to 5 seconds.
        SUBMIT rsconn01 WITH mode   = 'INT'
                        WITH output = 'X'
                        AND RETURN.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
          FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.

  • Convert Smartform in PDF format and send to SAP Workplace

    Hi to all.
    I need help of somebody expert in SMARTFORM's.
    I need to convert a smartform into PDF format and to send as attachement for SAP workplace
    of the user.
    I developed the next code.
    IT is to function and to send the mail for SAP workplace, but it happens that smartform
    contains images (logos) and tables, when the user tries to open the file pdf in inbox gives
    to error - "An unrecognized token ' q0 ' was found".
    I tried to call a smartform only with text and functioned well.
    Somebody can help me?
    My code:
    Begin ***********************************************
    REPORT zteste_nsa_send_pdf_sap_office.
    DATA: t_print LIKE zeps_fm04 OCCURS 0 WITH HEADER LINE,
          v_size TYPE i.
    DATA: ls_bil_invoice TYPE lbbil_invoice.
    TABLES: nast.
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    wa_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    wa_doc_chng TYPE sodocchgi1,
    w_data TYPE sodocchgi1,
    wa_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    START-OF-SELECTION.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = 'ZFPS_FICHA_VALORIZACAO'
        IMPORTING
          fm_name            = v_form_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      w_ctrlop-getotf    = 'X'.
      w_ctrlop-no_dialog = 'X'.
      w_compop-tdnoprev  = 'X'.
      CALL FUNCTION v_form_name
        EXPORTING
          control_parameters = w_ctrlop
          output_options     = w_compop
          user_settings      = 'X'
          is_bil_invoice     = ls_bil_invoice
          is_nast            = nast
          is_repeat          = 'X'
        IMPORTING
          job_output_info    = w_return
        TABLES
          t_list             = t_print
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      i_otf[] = w_return-otfdata[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
          bin_filesize          = v_len_in
        TABLES
          otf                   = i_otf
          lines                 = i_tline
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          OTHERS                = 4.
      IF sy-subrc EQ 0.
      ENDIF.
    Convert PDF from 132 to 255.
      LOOP AT i_tline.
        TRANSLATE i_tline USING '~'.
        CONCATENATE wa_buffer i_tline INTO wa_buffer.
      ENDLOOP.
      TRANSLATE wa_buffer USING '~'.
      DO.
        i_record = wa_buffer.
        APPEND i_record.
        SHIFT wa_buffer LEFT BY 255 PLACES.
        IF wa_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    SEND MAIL
      REFRESH:  i_reclist,
                i_objtxt,
                i_objbin,
                i_objpack.
      CLEAR wa_objhead.
    Object with PDF.
      i_objbin[] = i_record[].
    Object with main text of the mail.
      i_objtxt = 'Fichas de Valorização e Esquemas Tipo'.
      APPEND i_objtxt.
    Document information.
      wa_doc_chng-obj_name   = 'SMART'.
      wa_doc_chng-expiry_dat = sy-datum + 10.
      wa_doc_chng-obj_descr  = 'Ficha de Valorização'.
      wa_doc_chng-sensitivty = 'F'. "Functional object
      wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + STRLEN( i_objtxt ).
    Pack to main body as RAW.
    Obj. to be transported not in binary form
      DESCRIBE TABLE i_objtxt LINES v_lines_txt.
      READ TABLE i_objtxt INDEX v_lines_txt.
      CLEAR i_objpack-transf_bin.
      i_objpack-head_start = 1.
      i_objpack-head_num   = 0.
      i_objpack-body_start = 1.
      i_objpack-body_num   = v_lines_txt.
      i_objpack-doc_type   = 'RAW'.
      APPEND i_objpack.
    Packing as PDF.
    Obj. to be transported in binary form
      DESCRIBE TABLE i_objbin LINES v_lines_bin.
      READ TABLE i_objbin INDEX v_lines_bin.
      i_objpack-transf_bin = 'X'.
      i_objpack-head_start = 1.
      i_objpack-head_num   = 0.
      i_objpack-body_start = 1.
      i_objpack-body_num   = v_lines_bin.
      i_objpack-doc_type   = 'PDF'.
      i_objpack-obj_name   = 'SMART'.
      CONCATENATE 'Ficha_Valorizacao' '.pdf' INTO i_objpack-obj_descr.
      i_objpack-doc_size = ( v_lines_bin - 1 ) * 255 + STRLEN( i_objbin ).
      APPEND i_objpack.
    e-mail receivers.
      CLEAR i_reclist.
      i_reclist-receiver = sy-uname.
      i_reclist-rec_type = 'B'.
      i_reclist-express  = 'X'.
      APPEND i_reclist.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = ' '
        TABLES
          packing_list               = i_objpack
          object_header              = wa_objhead
          contents_bin               = i_objbin
          contents_txt               = i_objtxt
          receivers                  = i_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc EQ 0.
      ENDIF.
    End  *************************************************
    Thanks very much to all and Happy New year...
    Nelson

    Please check this link...
    [http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm]
    -Muktar

  • What are methods for converting otf to pdf format in sap script

    Hi,
    I have a requirement in script i have to convert that that otf file to pdf format,when i use function modules its corrupting that pdf file,So i want convert otf to pdf using class method any one can help me for that.If any sample coding for class method.
    Thanks.

    ok
    CALL FUNCTION 'CONVERT_OTF'
         EXPORTING
           format                = 'PDF'
    *      max_linewidth         = 255
         IMPORTING
           bin_filesize          = lv_bin_filesize
    *      bin_file              = pdf_xstring
         TABLES
           otf                   = lt_otf
           lines                 = lt_pdf_table
         EXCEPTIONS
           err_max_linewidth     = 1
           err_format            = 2
           err_conv_not_possible = 3
           err_bad_otf           = 4
           OTHERS                = 5.
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
          bin_filesize                    = lv_bin_filesize
          filename                        = c_name
          filetype                        = 'BIN'
    *     APPEND                          = ' '
    *     WRITE_FIELD_SEPARATOR           = ' '
    *     HEADER                          = '00'
    *     TRUNC_TRAILING_BLANKS           = ' '
    *     WRITE_LF                        = 'X'
    *     COL_SELECT                      = ' '
    *     COL_SELECT_MASK                 = ' '
    *     DAT_MODE                        = ' '
    *     CONFIRM_OVERWRITE               = ' '
    *     NO_AUTH_CHECK                   = ' '
    *     CODEPAGE                        = ' '
    *     IGNORE_CERR                     = ABAP_TRUE
    *     REPLACEMENT                     = '#'
    *     WRITE_BOM                       = ' '
    *     TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *     WK1_N_FORMAT                    = ' '
    *     WK1_N_SIZE                      = ' '
    *     WK1_T_FORMAT                    = ' '
    *     WK1_T_SIZE                      = ' '
    *     WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *     SHOW_TRANSFER_STATUS            = ABAP_TRUE
    *     VIRUS_SCAN_PROFILE              = '/SCET/GUI_DOWNLOAD'
    *   IMPORTING
    *     FILELENGTH                      =
         TABLES
           data_tab                        = lt_pdf_table
    *     FIELDNAMES                      =
        EXCEPTIONS
          file_write_error                = 1
          no_batch                        = 2
          gui_refuse_filetransfer         = 3
          invalid_type                    = 4
          no_authority                    = 5
          unknown_error                   = 6
          header_not_allowed              = 7
          separator_not_allowed           = 8
          filesize_not_allowed            = 9
          header_too_long                 = 10
          dp_error_create                 = 11
          dp_error_send                   = 12
          dp_error_write                  = 13
          unknown_dp_error                = 14
          access_denied                   = 15
          dp_out_of_memory                = 16
          disk_full                       = 17
          dp_timeout                      = 18
          file_not_found                  = 19
          dataprovider_exception          = 20
          control_flush_error             = 21
          OTHERS                          = 22.
       IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    TRY.
           GET PARAMETER ID 'RECEIPTENT' FIELD lvs_recipient1.
           send_request = cl_bcs=>create_persistent( ).
    *      lt_attach_bin = cl_document_bcs=>xstring_to_solix( ip_xstring = lt_solix ).
           APPEND 'Test message' TO lt_text.
           l_sub_50 = lc_test1.
           document = cl_document_bcs=>create_document( i_type    = 'RAW'
                                                        i_text    = lt_text
                                                        i_subject = l_sub_50 ).
           document->add_attachment( i_attachment_type    = 'PDF'
                                     i_attachment_subject = 'script.pdf'
                                     i_att_content_hex    =  lt_attach_bin ).
           l_sub_line = lc_test1.
           TRY.
    * Build subject line for email.
               CALL METHOD send_request->set_message_subject
                 EXPORTING
                   ip_subject = l_sub_line.
             CATCH cx_send_req_bcs INTO loref_obj_error.
               PERFORM sub_catch_error1 USING loref_obj_error.
           ENDTRY.
           send_request->set_document( document ).
    *      sender    = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
           recipient1 = lvs_recipient1-objkey.
           recipient = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
    *      send_request->set_sender( sender ).
           send_request->add_recipient( i_recipient = recipient
                                        i_express   = 'X' ).
           sent_to_all = send_request->send( i_with_error_screen = 'X' ).
           COMMIT WORK.
         CATCH cx_bcs INTO bcs_exception.
           MESSAGE 'eee' TYPE 'S'.
           EXIT.
       ENDTRY.

  • How to convert report to PDF format

    Hi,
    Please let me know the procedure to convert reports into PDF format.
    Thanks in Advance
    Irfan Hussain

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    <b>CONVERT_ABAPSPOOLJOB_2_PDF</b> FM convert abap spool output to PDF

  • Convert document to PDF format

    I have to convert invoice ot PDF . CAn anyone tell me the function module to convert any type document(word doc, text doc) to pdf.I will revord the points
    thanks

    Try out this code..maybe it will help
    report ZPDFPRNT no standard page heading.
    TABLES: TST05.
    DATA: BEGIN OF ITAB OCCURS 0,
       TLINE(255),
    END OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
      TLINE(255),
    END OF ITAB2.
    DATA: BEGIN OF ITAB3 OCCURS 0,
      TLINE(255),
    END OF ITAB3.
    DATA: BEGIN OF OTF_TAB OCCURS 0,
      TLINE(255),
    END OF OTF_TAB.
    DATA: LEN_OUT LIKE SOOD-OBJLEN.
    DATA: LEN_IN LIKE SOOD-OBJLEN.
    DATA: BEGIN OF DATA_SET OCCURS 200,
      DATA_LENGTH(5),
      PRECOL(1),
      DATA_LINE(1000),
    END OF DATA_SET.
    DATA: BEGIN OF OTF_PAGE OCCURS 200.
      INCLUDE STRUCTURE ITCOO.
    DATA: END OF OTF_PAGE,
    OTF_PAGES TYPE P,
    OTF_MAX_PAGES TYPE P VALUE 10.
    DATA: BEGIN OF OTF_CONTROL.
      INCLUDE STRUCTURE ITCPP.
    DATA: END OF OTF_CONTROL,
    FORCE_RAW_OTF VALUE ' ',
    L100_EXCLUDE(4) VALUE 'OTFJ',
    BEGIN OF OTF_PAGE_INDEX OCCURS 20,
      LINE_NUM TYPE P,
    END OF OTF_PAGE_INDEX,
    CUR_OTF_PAGE VALUE 1.
    DATA: DATA_SET_LINECOUNT TYPE P,
    DATA_SET_MAX_LINES TYPE P VALUE 100000,
    DATA_SET_VALID TYPE C VALUE ' ',
    DATA_SET_IS_OTF TYPE C VALUE ' ',
    DATA_SET_LENGTH(5) TYPE C,
    LINE_SPECIAL LIKE DATA_SET-DATA_LINE,
    NEED_LINE_SPECIAL TYPE C,
    DSN_TYPE(8) TYPE C.
    DATA: FCODE(4) TYPE C,
    DATE TYPE D,
    TIME TYPE T,
    RC(10) TYPE C,
    ERRMSG(100) TYPE C,
    PRINTJOB_CREATED(1) TYPE C,
    PRINTJOB_CLEARED(1) TYPE C,
    PRINTJOB_LIST(1) TYPE C,
    DISPLAY_MODE(1) TYPE C,
    LINE_MAX TYPE P VALUE '100000',
    NEW_SCREEN_300(1) TYPE C,
    MULTI_PRINT_300(1) TYPE C,
    PRINT_ALL_300(1) TYPE C,
    PRINT_COUNT_300 TYPE I,
    SHOW_USER_100 TYPE C VALUE ' ',
    ERROR_DISPLAY_LEVEL TYPE C VALUE '9',
    NEXT_ERROR_DISPLAY_LEVEL TYPE C,
    PREV_ERROR_DISPLAY_LEVEL TYPE C,
    START_300(5) TYPE C, END_300(5) TYPE C,
    SEP LIKE SY-VLINE,
    DEFAULT_PRI,
    TSP01_BUF LIKE TSP01,
    TSP01_CURLINE LIKE SY-STARO,
    TSP01_CURCOL LIKE SY-CUCOL,
    TSP01_CURROW LIKE SY-CUROW.
    DATA: BEGIN OF DATA_SET_LINE,
      DATA_LENGTH(5),
      PRECOL(1),
    DATA_LINE(1000),
    END OF DATA_SET_LINE.
    DATA: STATUS LIKE SY-SUBRC.
    DATA: WGF_MESSAGE(80).
    DATA: H_PATH(20) TYPE C.
    DATA: H_MASK(20) TYPE C VALUE ',.pdf ,.pdf. '.
    DATA: FILE_NAME(20).
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    DATA: IMPORT(132).
    PARAMETERS: IDENT(5) TYPE C.
    PERFORM GET_OTF_TAB.
    LOOP AT OTF_PAGE.
       OTF_TAB-TLINE = OTF_PAGE.
       APPEND OTF_TAB.
    ENDLOOP.
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      FORMAT_SRC = 'OTF'
      FORMAT_DST = 'PDF'
      DEVTYPE = 'ASCIIPRI'
      LEN_IN = LEN_IN
    IMPORTING
      LEN_OUT = LEN_OUT
    TABLES
      CONTENT_IN = OTF_TAB
      CONTENT_OUT = ITAB2
    EXCEPTIONS
      ERR_CONV_FAILED = 1
      OTHERS = 2.
    PERFORM GET_PATH USING 'PDF_FILE'.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      FILENAME = FILENAME
      FILETYPE = 'BIN'
      BIN_FILESIZE = LEN_OUT
    TABLES
      DATA_TAB = ITAB2
    EXCEPTIONS
      FILE_OPEN_ERROR = 1
      FILE_WRITE_ERROR = 2
      INVALID_FILESIZE = 3
      INVALID_TABLE_WIDTH = 4
      INVALID_TYPE = 5
      NO_BATCH = 6
      UNKNOWN_ERROR = 7
      OTHERS = 8.
    *& Form GET_OTF_TAB
    FORM GET_OTF_TAB.
    DATA: PART(4) VALUE '0001',
    BEGIN OF MSG,
      A(40),
      B(40),
      C(40),
    END OF MSG.
    REFRESH DATA_SET.
    DATA_SET_LINECOUNT = 0.
    DATA_SET_IS_OTF = ' '.
    OTF_PAGES = 0.
    REFRESH OTF_PAGE_INDEX.
    CALL 'RSPOACSD'.
    SELECT * FROM TST05 WHERE DTHREAD = 'X'.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'TYPE' FIELD TST05-DTYPE
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    IF STATUS = 0.
      DSN_TYPE = TST05-DTYPE.
      IF DSN_TYPE(3) = 'OTF'.
        DATA_SET_IS_OTF = 'X'.
      ENDIF.
    ENDIF.
    IF STATUS <> 24. EXIT. ENDIF.
    ENDSELECT.
    DATA_SET_VALID = 'X'.
    DATA_SET_MAX_LINES = ( LINE_MAX * '1.1' ) + 100.
    DO.
    CLEAR: DATA_SET_LINE, DATA_SET_LENGTH.
    CALL 'RSPOARSD'
    ID 'BUFF' FIELD DATA_SET_LINE+5
    ID 'DATALEN' FIELD DATA_SET_LENGTH
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    IF STATUS = 36.
    WHILE STATUS = 36.
    CALL 'RSPOACSD'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ADD 1 TO PART.
    IF DATA_SET_IS_OTF = ' '.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'TYPE' FIELD DSN_TYPE
    ID 'PART' FIELD PART
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ELSE.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'PART' FIELD PART
    ID 'TYPE' FIELD DSN_TYPE
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ENDIF.
    IF SY-SUBRC NE 0. EXIT. ENDIF.
    CLEAR: DATA_SET_LINE, DATA_SET_LENGTH.
    CALL 'RSPOARSD'
    ID 'BUFF' FIELD DATA_SET_LINE+5
    ID 'DATALEN' FIELD DATA_SET_LENGTH
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    ENDWHILE.
    ENDIF.
    IF STATUS <> 0 AND STATUS <> 40. EXIT. ENDIF.
    DATA_SET = DATA_SET_LINE.
    IF NOT ( DATA_SET_LENGTH IS INITIAL ).
    DATA_SET-DATA_LENGTH = DATA_SET_LENGTH - 1.
    ENDIF.
    APPEND DATA_SET.
    ADD 1 TO DATA_SET_LINECOUNT.
    IF DATA_SET_IS_OTF = ' '.
    IF DATA_SET_LINECOUNT >= DATA_SET_MAX_LINES.
    CLEAR DATA_SET.
    APPEND DATA_SET.
    MOVE '----
    ' TO DATA_SET-DATA_LINE.
    APPEND DATA_SET.
    CLEAR DATA_SET.
    APPEND DATA_SET.
    WRITE: 'Abbruch nach'(029) TO MSG-A.
    WRITE: DATA_SET_MAX_LINES TO MSG-B.
    WRITE: 'Zeilen.'(030) TO MSG-C.
    CONDENSE MSG.
    DATA_SET-DATA_LINE = MSG.
    APPEND DATA_SET.
    EXIT.
    ENDIF.
    ELSE.
    MOVE DATA_SET_LINE-DATA_LINE TO OTF_PAGE.
    APPEND OTF_PAGE.
    IF OTF_PAGE(2) = 'EP'.
      ADD 1 TO OTF_PAGES.
      IF OTF_PAGES >= OTF_MAX_PAGES.
        MESSAGE S229(PO) WITH OTF_MAX_PAGES.
        EXIT.
      ENDIF.
    ELSEIF OTF_PAGE(2) = 'OP'.
      OTF_PAGE_INDEX-LINE_NUM = DATA_SET_LINECOUNT.
      APPEND OTF_PAGE_INDEX.
    ENDIF.
    ENDIF.
    ENDDO.
    IF STATUS <> 0 AND STATUS <> 12.
      CALL 'RSPOACSD'.
      MESSAGE E112(PO) WITH STATUS RC ERRMSG.
    ENDIF.
    CALL 'RSPOACSD'.
    STATUS = SY-SUBRC.
    IF STATUS <> 0.
      MESSAGE E112(PO) WITH STATUS RC ERRMSG.
    ENDIF.
    ENDFORM. " GET_OTF_TAB
    *& Form GET_PATH
    FORM GET_PATH USING P_FILENAME.
    CLEAR: H_PATH, FILE_NAME.
    FILE_NAME = P_FILENAME.
    CALL FUNCTION 'WS_QUERY'
    EXPORTING
    QUERY = 'CD' "// Current Directory
    IMPORTING
    RETURN = H_PATH.
    CONCATENATE FILE_NAME '.pdf' INTO FILE_NAME.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      DEF_FILENAME = FILE_NAME
      DEF_PATH = H_PATH
      MASK = H_MASK
      MODE = 'O'
    IMPORTING
      FILENAME = FILENAME"dbname
    EXCEPTIONS
      INV_WINSYS = 1
      NO_BATCH = 2
      SELECTION_CANCEL = 3
      SELECTION_ERROR = 4
      OTHERS = 5.
    ENDFORM. " GET_PATH
    Thanks and regards

  • Converting Spool to Pdf format

    Hi,
    How do you convert a SAP Script Spool in TCode SP01 to a pdf format?
    Any helpw would be greatly appreciated.
    Thanks in advance.
    Mick

    Just today someone has posted this link somewhere
    https://wiki.sdn.sap.com/wiki/display/sandbox/Conversion%20of%20Spool%20Request%20Data%20into%20PDF%20and%20Excel%20Format%20and%20Send%20it%20into%20Mail

  • Problem in converting reports  to PDF format - bug

    dear all,
    There is a problem in converting the reports in PDF format.
    The situation is that if we use the tool bar icon in SAP B1 to get the reports in PDF format, there are printing errors. The output PDF file does not contain the exact data that is in the report, the values are getting interchanged and mismatched.
    But if we do the same using the print in the PDF option in choose from printers window as we do regular pringting, the document is printed properly.
    what may be the cause for this bug like thing. How can we solve it??
    please help me..
    thanks and regards,
    Yeshwanth Prakash

    Check this SAP Note: 1089388     Incorrect value in exported PDF when Concat function is used
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=1089388]

  • Convert XSTRING to PDF Format and Send it as an attachment with work-item

    I have an Adobe Form data available in the ECC system in XSTRING format. In one of my ABAP methods (used by a custom workflow task), i want to convert the XSTRING data in PDF format and send it as an attachment with a work-item. How best can this be done?
    Appreciate any ideas,
    Saurabh

    Hi Saurabh,
    if u want to download pdf which is in xstring format to u r local system
    u can try the following code.
    data: data_tab type table of x255.
    call function 'SCMS_XSTRING_TO_BINARY'
    exporting
    buffer = XString data
    tables
    binary_tab = data_tab.
    cl_gui_frontend_services=>gui_download(
    exporting
    filename = filename
    filetype = 'BIN'
    changing
    data_tab = data_tab ).
    cl_gui_frontend_services=>execute(
    exporting
    document = filename ).
    Regards,
    Chandru

  • Unable to convert DOC to PDF format(IBR)

    Hi,
    I have Oracle UCM 11g...
    I have configured file formats DOC to be converted to PDF
    in file extensions of configuration manager applet.. i have made following changes
    set extention doc as application/pdf
    & in file format of configuration manager
    selected format application/msword to conversion PDF Refinement
    in IBR Ive uninstalled OpenOfficeConversion & PDFExportConverter enabled
    After making this changes also i'm not able to convert to PDF format.
    Any help highly appreciated.
    Thanks,
    AR

    You don't need Acrobat for this at all.
    If you select "Print..." there is a "PDF..." button in the lower left corner of the dialog. Click the button and select "Save as PDF..." or you can do "Open in Preview..." and save from there.
    OS X has had the ability to generate PDFs since the 10.0 days. The whole graphics infrastructure is based on PDFs. You have no need whatsoever for Acrobat on the machine to do this.

Maybe you are looking for

  • I have two itunes accounts.  Can  I merge my music to one account?  If so, how

    I have two itune accounts.  Is it possible to merge my music to just one account? If so, how?

  • Page rotate script not working(not allowed error security settings prevent access to this property)

    HI, I am using a script to rotate each pages in pdf file when clicking a button. I have added a script to rotate file in the rotate button's click event as a javascript.It is working in acrobat but not in adobe reader. Pleae see the script nStart = 0

  • Is this PSU powerful enough?

    Hello, New member here.. I have just built a system composing of the following: ZORRO 865W SCORPIO (SILVER) K8T NEO FISR2 (BIOS 1.4) AMD64 3200+ CREATIVE AUDIGY 2 HIGHTECH RADEON 9800 PRO CORSAIR TWINX-XMS3700 (1GB) SONY DVD-ROM PIONEER DVR 106D Is t

  • Planned Costs by Quarter

    Hi all, does anyone have any suggestions on how we could enter planned costs per quarter for a project? I see we can enter planned costs per monthly period per cost element but not per quarter. Preferably, I would not need to use cost element plannin

  • Strange Windows XP Air behaviour

    On Windows XP when a non administrator user (Standard user) attempts to uninstall an Air Application they get this message. Adobe Air Error I have tried this on several PCs and with several air applications but I get the same error. Has anyone else s