Display Payslip in PDF format on Screen

Hi SAP Gurus...
I have done the below to generate the SAP HR Reminaration statement in PDF.
  CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
    EXPORTING
      employeenumber = p_pernr
      sequencenumber = it_rgdir-seqnr
      payslipvariant = p_forml
    IMPORTING
      return         = i_return
      payslip        = x_payslip
      pdf_fsize      = v_pdf_size.
Now, I want to display it in PDF on the Screen.
Please tell us how to proceed further.
thanks in advance.
regards,
R R Suthar

Dear Gurus...
Thanks  for help.
I have already done this,but I want to do it without using the FMs GUI_DOWNLOAD and GUI_RUN(which is obsolute).
Instead I want to display PDF data using any other method.
Can any body suggest how to do using class / method.
thanks in advance.
regards,
R R Suthar

Similar Messages

  • 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.

  • Displaying report in .pdf format while Running oracle reports over the web

    I am running a report over the web via IE. I am suing .pdf
    format as the file type. The problem I am facing is that the
    report comes out with a blank in acrobat reader if there are
    just one or two records - i.e less thatn one pagefull. THe
    reports displays output only when there ar more than one
    pagefull of records.
    Any explanation for this bezarre behavior and any suggestions?
    I will very much appreciate your help.
    Regards
    Prasad.

    in R12 I found 2 choice
    1) when submitting requests (if available) you can set the output format by using the Options button (upon sompletion section):
    layout --> format --> select format you need (RTF/HTML/EXCEL/PDF)
    2) in the request form (view->request) selecr the report you want to reprint in the Tools menu select print/republish, in the html page that pop up select output format you want, number of copies =1 submit
    www2p

  • Payslip in PDF Format and send to mail

    Hi,
    I created one Payslip in SMARTFORMS,
    Now i want to convert into PDF Format and send as mail....
    How to do Pls help me...
    with regards
    suresh
    Edited by: rsnaidu on Jun 28, 2011 3:28 PM

    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

  • Action - Display smartform in PDF format

    Hi All,
    I have a requirement whereby on triggering of a print form action in crmd_order, the smartform should be displayed in PDF format and from there, user should be able to choose whether to save or to print the form. How can this be done?
    Thanks!
    Cady

    Hi,
    Here's the solutions.
    1 .Show the PDF as pop-up upon trigger, very much the same how PDF attachment always pops up in the internet explorer. But this pops up in GUI.
    Call the smartform FM with the GETOTF checked,
    control_parameters-GETOTF = 'X'.
    control_parameter-no_dialog = 'X'.
    control_parameter-langu = <ur language>.
    output_options-tddest = 'LOCL'.
    output_option-tdimmed = 'X'.
    output_option-tddelete = 'X'.
    i_otf = job_output_info-OTFDATA.
    CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
      EXPORTING
        i_otf                          = i_otf
    EXCEPTIONS
       CONVERT_OTF_TO_PDF_ERROR     
       CNTL_ERROR                   
       OTHERS                        
    2. Triggering action in ICWC and PDF pops up in new window.
    Call function 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          i_language             = sy-langu
        IMPORTING
          e_devtype              = devtype
        EXCEPTIONS
          no_language              
          language_not_installed
          no_devtype_found       
          system_error             
          others                       
    control_parameters-langu = sy-langu.
        control_parameters-no_dialog = 'X'.
        control_parameters-getotf       = 'X'.
    CALL FUNCTION '<your_form_FM>'
      EXPORTING
       CONTROL_PARAMETERS      = control_parameters
       OUTPUT_OPTIONS                 = output_options
    IMPORTING
       JOB_OUTPUT_INFO                = output_data
      TABLES
       orderadm_h       = <your tables>
      EXCEPTIONS
       FORMATTING_ERROR      
       INTERNAL_ERROR            
       SEND_ERROR                  
       USER_CANCELED            
       OTHERS                           
    call function 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = l_pdf_len
          bin_file                = l_pdf_xstring
        TABLES
          OTF                    = OUTPUT_DATA-OTFDATA
          LINES                 = LT_LINES
        EXCEPTIONS
          err_max_linewidth       
          err_format                  
          err_conv_not_possible 
          err_bad_otf                 
          others                        
    CREATE OBJECT cached_response TYPE CL_HTTP_RESPONSE  EXPORTING add_c_msg = 1.
        l_pdf_len = xstrlen( l_pdf_xstring ).
        cached_response->set_data( data   = l_pdf_xstring
                            length = l_pdf_len ).
    cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                           value = 'application/pdf' ).
        cached_response->set_status( code = 200 reason = 'OK' ).
        cached_response->server_cache_expire_rel( expires_rel = 180 ).
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.pdf' INTO display_url.
        cl_http_server=>server_cache_upload( url      = display_url
                                             response = cached_response ).
                                             url = display_url.
    RETURN.
    Declare display_url as an attribute in the implementation class as well as page attribute.
    Push the display_url value to page attribute using the SET_MODELS method in the implementation class.
    Clear display_url in DO_INIT_CONTEXT so that PDF only pops up when action is triggered.
    Put this piece of code in the page htm.
    I can't seem to be able to put the code here. It's a java script.
      IF display_url IS NOT INITIAL.
    * I can't show the script here for i kept getting error when i tried putting the java script here.
      ENDIF.
    3. To trigger a print action and send PDF attachment in background, a spool will still be created. 
    Call the smartform FM as usual.
      lt_spoolid[] = es_job_output_info-spoolids[].
      READ TABLE lt_spoolid INTO lw_spoolid INDEX 1.
      CHECK lw_spoolid IS NOT INITIAL.
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid                = lw_spoolid
          no_dialog                  = 'X'
        IMPORTING
          pdf_bytecount            = lw_bytecount
        TABLES
          pdf                             = lt_lines
        EXCEPTIONS
          err_no_otf_spooljob      
          err_no_spooljob            
          err_no_permission        
          err_conv_not_possible   
          err_bad_dstdevice         
          user_cancelled             
          err_spoolerror               
          err_temseerror              
          err_btcjob_open_failed  
          err_btcjob_submit_failed
          err_btcjob_close_failed  
          OTHERS                      
      IF sy-subrc NE 0.
    */    Set to incorrectly processed.
        CALL METHOD cl_log_ppf=>add_message
          EXPORTING
            ip_problemclass = '2'
            ip_handle       = ip_application_log.
      ENDIF.
      CHECK sy-subrc = 0.
    * Convert PDF from 132 to 255, combine everything into a single string.
      LOOP AT lt_lines INTO lw_lines.
    * Individually replace the space with a '~'.
        TRANSLATE lw_lines USING ' ~'.
        CONCATENATE lw_buffer lw_lines INTO lw_buffer.
      ENDLOOP.
    * Replace '~' by space.
      TRANSLATE lw_buffer USING '~ '.
      DO.
    *   Putting in the first 255 chars into the variable.
        lw_record = lw_buffer.
    *   Append 255 chars as a record.
        APPEND lw_record TO lt_record.
        SHIFT lw_buffer LEFT BY 255 PLACES.
        IF lw_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    * Object with PDF.
      lt_objbin = lt_record.
      DESCRIBE TABLE lt_objbin LINES lw_lines_bin.
    * Object with main text for the mail.
      lw_objtxt = <your text>
      append lw_objtxt to lt_objtxt.
      DESCRIBE TABLE lt_objtxt LINES lw_lines_txt.
    * Document information.
      lw_doc_chng-obj_name    = 'Smartform'.
      lw_doc_chng-expiry_dat  = sy-datum + 20.
      lw_doc_chng-obj_descr   = <your text>.
      lw_doc_chng-sensitivty  = 'F' 
      lw_doc_chng-doc_size    = lw_lines_txt * 255.
    * Pack to main body as RAW
    * Obj to be transported not in binary form
      CLEAR lw_objpack-transf_bin.
    * Start line of object header in transport packet.
      lw_objpack-head_start = 1.
    * Number of lines and object header in object packet.
      lw_objpack-head_num = 0.
    * Start line of object contents in an object packet.
      lw_objpack-body_start = 1.
    * Number of lines of the object contents in an object packet.
      lw_objpack-body_num = lw_lines_txt.
    * Code for document class.
      lw_objpack-doc_type = 'RAW'.
      APPEND lw_objpack TO lt_objpack.
    * Packing as PDF.
      lw_objpack-transf_bin = lc_x.
      lw_objpack-head_start = 1.
      lw_objpack-head_num   = 0.
      lw_objpack-body_start = 1.
      lw_objpack-body_num   = lw_lines_bin.
      lw_objpack-doc_type   = 'PDF'.
      lw_objpack-obj_name   = <your text>.
      CONCATENATE '<your text>' '.pdf' INTO lw_objpack-obj_descr.
      lw_objpack-doc_size   = lw_lines_bin * 255.
      APPEND lw_objpack TO lt_objpack.
    * Document information.
      CLEAR lw_reclist.
    * Email receivers.
      lw_reclist-receiver = <email address>
      lw_reclist-express  = 'X'.
      lw_reclist-rec_type = 'U'. "Internet address.
      lw_reclist-com_type ='INT'.
      APPEND lw_reclist TO lt_reclist.
    * Send mail.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = lw_doc_chng
        TABLES
          packing_list                 = lt_objpack
          object_header              = lw_objhead
          contents_txt                = lt_objtxt
          contents_bin               = lt_objbin
          receivers                     = lt_reclist
        EXCEPTIONS
          too_many_receivers            
          document_not_sent            
          document_type_not_exist   
          operation_no_authorization 
          parameter_error                 
          x_error                             
          enqueue_error                   
          OTHERS                          
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
    */    Set to incorrectly processed.
        CALL METHOD cl_log_ppf=>add_message
          EXPORTING
            ip_problemclass = lc_2
            ip_handle       = ip_application_log.
      ENDIF.
    4. Trigger action and send PDF attacment as mail. No Spool.
    control_parameters-GETOTF = 'X'.
    control_parameter-no_dialog = 'X'.
    control_parameter-langu = <ur language>.
    output_options-tddest = 'LOCL'.
    output_option-tdimmed = 'X'.
    output_option-tddelete = 'X'.
      CALL FUNCTION 'your smartform FM
        EXPORTING
          control_parameters = lw_ctrl_params
          output_options     = lw_output_options
          user_settings      = space              "Has to be set to SPACE so it will get parameters from lw_output_options.
          et_orderadm_h    
          et_orderadm_i     
          et_cancel          
          et_appointment    
          et_partner        
          es_but000         
        IMPORTING
          job_output_info    = lw_output  "OTF format
        EXCEPTIONS
          formatting_error  
          internal_error    
          send_error        
          user_canceled     
          OTHERS            
    * Get the OTF data.
      lt_otf = lw_output-otfdata[].
    * Convert OTF format to PDF.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = lw_bin_filesize
        TABLES
          otf                     = lt_otf
          lines                  = lt_lines
        EXCEPTIONS
          err_max_linewidth       
          err_format                  
          err_conv_not_possible 
          err_bad_otf                 
          OTHERS                    
    The rest will the similiar to no.3, * Convert PDF from 132 to 255, combine everything into a single string. onwards.
    Cheers,
    ck.

  • Displaying a form in an iView & displaying data in .pdf format in an iView

    Hi,
    1)We want to show some details in an iView pertaining to the person who has logged into the portal. We are calling a function module (when a user clicks on a workset in the portal) and passing some parameters to it. The function module pulls the data from the tables and generates a sap script which displays the data in a SAP Script Form.
    Now our problem is how do we display the form in the iView?
    2) We want to show some details in an iView pertaining to the person who has logged into the portal. We are calling a function module (when a user clicks on a workset in the portal) and passing some parameters to it. The function module pulls the data from the tables and converts the data into a pdf file.
    How do we display the data in the .pdf format in the iView.

    Hi,
    displaying a PDF in an iView I receive the following errormessage:
    Access denied:.....
    security zone:.....
    The portalapp.xml is like
    <property name="SecurityZone" value="epp/NO_SAFETY"/>
                    <property name="ResourceBundleName" value="epp_lang"/>
                    <property name="AuthRequirement" value="none"/>
    Any ideas?
    Thanks
    Walter

  • Displaying qoutation in pdf format

    Hi Friends,
         I have developed Quotation(script) .  My main requirement is to display the output in
    PDF format, for that i changed the driver program as instructed by many friends,
    but i am getting error as "OTF end command // missing in OTF data".
    any one kindly suggest,
    its urgent.
    Thanks in Advance.
    regards,
    desha.

    Hi Ram,
    I used all the parameters  that u have sent and referred that link also but also i am getting same error (OTF end command // missing in OTF data).
    please see my coding.
      CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         FORMAT                      = 'PDF'
         MAX_LINEWIDTH               = 255
        ARCHIVE_INDEX               = ' '
        COPYNUMBER                  = 0
        ASCII_BIDI_VIS2LOG          = ' '
        PDF_DELETE_OTFTAB           = ' '
       IMPORTING
         BIN_FILESIZE                = binfilesize
        BIN_FILE                    =
        TABLES
          otf                         = dattab[]
          lines                       = pdftab[]
      EXCEPTIONS
        ERR_MAX_LINEWIDTH           = 1
        ERR_FORMAT                  = 2
        ERR_CONV_NOT_POSSIBLE       = 3
        ERR_BAD_OTF                 = 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.
      call method cl_gui_frontend_services=>gui_download
    exporting
    bin_filesize = binfilesize
    filename = 'D:\myfile.pdf'
    filetype = 'BIN'
    changing
    data_tab = pdftab[]
    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.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
         BIN_FILESIZE                    = BINFILESIZE
          filename                        = 'D:\myfile.pdf'
         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_EOL                       = ABAP_TRUE
      IMPORTING
        FILELENGTH                      =
        tables
          data_tab                        = pdftab[]
        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.
    ENDFORM.                    "FORM_CLOSE
    please check this,
    regards,
    desha.

  • Could not display output in PDF format from a RDF file

    Hi all,
    I'm calling a report file (.RDF) from the browser using RWCGI.EXE, and specified the output in PDF format, but it always asking me to download the active-X for the PDF file generated by the report. I have Adobe Acrobat Reader installed on my machine, what could be the problem?
    thanks in advance.

    I had the same problem.
    As a quick fix, what I enventually did, if you are using WebDB and CGI, is to create an alias in the cgicmd.dat file.
    It worked after.
    Example of line:
    ===============
    web41pdf: report=web_41.rdf server=Rep60_Z11734 userid=DEMO6I/DEMO6I@PERSOEM destype=cache desformat=PDF tolerance=1440
    Then you call the URL http://<web site>/rw60cgi?web41pdf
    Yet I would be glad to understand why I also get this message.
    Philippe Dalmas.

  • Displaying output in PDF format

    Hi
    I have a requirement .
    I have a button in a page , when i click on the button output should be opened in PDF format.
    In a Standard Page i have 4 radio buttons , initially i can select only one radio button on the standard page, but my requirement is i have to select 2 radio buttons as an option .
    Thanks

    Hi ,
    For PDF output refer this link
    http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework
    Keerthi

  • Displaying image in pdf format - what is this image format?

    Hi All,
    I have a requirement where I need to embed an image in a pdf report that gets generated in BIP. The image is passed as a byte array from an external application , that BIP should recieve as a parameter and display it. The byte array looks very similar to the image that rtf generates when an image is pasted in it and the default xsl-fo template and style-sheet is created usign the BIP Word Plugin.
    The issue that I am facing is that, the byte-code is not getting displayed as an image in the pdf.
    When I pasted the image for the corresponding byte code in an rtf and generated the default xslfo file that BIP plugin generates, I am getting a different set of charecters than what is being send to BIP as parameter.
    I have read about CLOB and BLOB being queried from database using sql and displayed as image.
    I would like to know what exactly is the BIP Plugin converting the image to , when I paste it in an rtf and convert it to xsl-fo style sheet.
    If I have not made my query very clear and you are still confused about what I am talking about , please try this out in an rtf template.
    1) Open blank rtf template
    2) Paste any tiff or jpg image in your rtf template and save it.
    3) Goto Addin --> Tools --> Export --> Click on FO Formated XML or XSL FO Style sheet in the Menu
    4) An xml document will be opened in your default browser.
    5) Scroll down to the section with the tag " <fo:instream-foreign-object"
    6) Will see a big charecter set, which I believe is some form of representation of the image pasted in the rtf.
                   <fo:block>
                             <fo:instream-foreign-object
                             content-type="image/png"
                             width="163.5375pt"
                             height="53.07pt"
                             xdofo:alt="An Image"
                             xdofo:image-uid="fbasadsadaferehgffhghd1dvcxab9">               
                             <xsl:value-of select="$Logo3"/>
                             </fo:instream-foreign-object>
                   </fo:block>
    WHERE $Logo3 is declared as parameter and
    = /9j/4AAQSkZJRgABAgEAYABgAAD/7Q0YUGhvdG9zaG9wIDMuMAA4QklNA+0KUmVz b2x1dGlvbgAAAAAQAGAAAAABAAEAYAAAAAEAAThCSU0EDRhGWCBHbG9iYWwgTGln aHRpbmcgQW5nbGUAAAAABAAAAHg4QklNBBkSRlggR2xvYmFsIEFsdGl0dWRlAAAA ................................................goes on!!! [ 200000+ charecters]
    I would like to know what this image type is? Is this a byte array?
    If any one has had this and successfully taclkled this sort of requirement please help!!!
    Any pointers, explanations in this regard would be really helpful
    Thanks in advance
    Sujith

    What exact version of CF7 are you on?

  • Display BLOB File (pdf format) from database inside Oracle Form (6i)

    hi all.
    Apologies for a primitive question owing to the fact that i m new to development. I have a requirement to display a pdf document with in an oracle form. i want to know is there any such control for that? or any hint how to go about it?
    thanks in advance

    Here I have found my jsp script...
    How I get the PDF?
    I call my script from pl/sql with
    web.show_document('http://my_server/getblob.jsp?id=' || id_from_my_blob_table || '&baza=myhost:1521:sid','_blank');
    <%@ page contentType="text/html;charset=windows-1250"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="oracle.jdbc.driver.OracleDriver" %>
    <%@ page import="oracle.jdbc.driver.OracleResultSet" %>
    <%
    Connection con = null;
    Statement stmt = null;
    ResultSet rs= null;
    oracle.sql.CLOB clob = null;
    oracle.sql.BLOB blob = null;
    String datoteka = "";
    String host = "http://" + request.getHeader("host") + "/";
    %>
    <!--Peter Valencic 2003 -->
    <html>
    <head>
    <title></title>
    </head>
    <%
       String tip ="";
       String id ="";
       String baza ="";
       String shema ="";
    try
       id = request.getParameter("id");
       baza = request.getParameter("baza");
       shema = request.getParameter("shema");
       if (request.getParameter("id")== null)
          throw new Exception("id= null");
       else if(request.getParameter("id").equals(""))
          throw new Exception("id= null");
       if (request.getParameter("baza")== null)
          throw new Exception("baza= null");
       else if(request.getParameter("baza").equals(""))
          throw new Exception("baza= null");
       if (request.getParameter("shema") == null)
         shema ="";
       else if (request.getParameter("shema").equalsIgnoreCase(""))
         shema="";
       else
         shema =shema + ".";
    catch(Exception e)
       out.println("Priąlo je do napake: " + e.toString());
       return;
          try
                Class.forName("oracle.jdbc.driver.OracleDriver");
                con = DriverManager.getConnection("jdbc:oracle:thin:@"+baza,"your_user","your_password");
                stmt =con.createStatement();
                rs = stmt.executeQuery ("Select * from "+shema+"DOK_VSEBINA_DOKUMENTA_BLOB where ID="+id);
                boolean podatkib = rs.next();
                if (!podatkib)
                   out.print("<li>Ni podatkov za  ID="+id);
                   return;
                blob = ((oracle.jdbc.OracleResultSet)rs).getBLOB("VSEBINA");
                datoteka = rs.getString("NAZIV_DATOTEKE").toUpperCase();
                   File blobFile = new File(application.getRealPath("/uploads/blob")+"/"+datoteka);
                blobFile.createNewFile();
                InputStream podatki = blob.getBinaryStream();
                FileOutputStream strBlob= new FileOutputStream(blobFile);
                int size = blob.getBufferSize();
                byte[] buffer = new byte[size];
                int length = -1;
                while ((length = podatki.read(buffer)) != -1)
                   strBlob.write(buffer,0,length);
                podatki.close();
                strBlob.close();
                con.close();
                out.print("<li>"+host+"in2/uploads/blob/"+datoteka);
                   response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
                //odpremo z jsp-stranjo datoteko..
                //response.sendRedirect("");
          catch(Exception blobException)
             out.print("<li>(BLOB)Napaka pri prebiranju podatkov:</li>"+blobException.toString());
             return;
    out.println("konec..");
    %>
    <body>
    <form method="post">
    Vnesi ID
    <input type=text name="id">
    <li> <input type=submit name="potrdi" >
    </form>
    </body>
    </html>If you look my "old" script..
    first it get 2 parameters baza= database (ip:port:sid), id= id from my table (PK)
    at the end of my script I have:
    response.sendRedirect(host+"in2/uploads/blob/"+datoteka);
    this redirect will redirect you to your file stored on server side..
    Because IE knows what file it must open it will open it with PDF reader...
    hope this help you..
    Edited by: peterv6i.blogspot.com on May 14, 2012 11:14 AM

  • Payslip distribution (in pdf format) via email

    Dear All,
    Please help with the configuration steps to distribute payslip in PDF Format to their official email.Kindly suggest the steps to configure the same.
    Best Regards,

    Hi Bobby
    As soon as User execute payslip. The payslip will get generated and an email will be sent to respective employee in PDF format.
    How about Posting. Without Bank Transfer How can User send Payslip that will be the main question arises from User.  In cases of wrong entries or reversal posting how would you manage?
    The finance department should confirm that there is Bank Transfer Once there done with Bank Transfer  An email should be trigerred 

  • Multiple Payslips in PDF Document

    Hi All,
    We have a requirement of getting multiple Payslips in a single PDF document.
    Right now, we use the Java Webdynpro application to display payslips in ESS using a custom HR Form / Smartform.
    This allows us to display a single payslip in PDF format.
    Our requirement is to input a date range, and if that date range has 12 salary statements(assuming each statement is one page), we need a PDF document created with 12 pages in it.
    Upon analysis, I found the class CL_HRXSS_REM used to generate the standard payslips.
    Any guidance, in terms of how I can use this to meet our requirement would be highly appreciated.
    Thanks,
    Saleem

    you can control from here but having multiple payslips ? you mean different smartforms for each scenario??
    You can check these features
    1. HRFOR  - This feature decides whether to use HRFORMS or CEDT forms
    (configured in PE51) for the payslip. If HRFORMS, the name of HRFORM has
    to be mentioned here. If PE51 needs to be used then $CEDT$ should be
    specified.
    2. EDTIN - This should hold the value of the variant to be executed in
    the CEDT program (payslip program). The variant should be proper with
    the with the correct CEDT (payslip) form name and other parameters.
    3. EDPDF - The name of the smartform (standard smartform
    HR_ESS_PAYSLIP_TO_PDF or customer specific form) used to show the output
    in the ESS.
    Or you can check in method L_PRODUCE_FORM
    Default implementation of BADI XSS_REM_INTERFACE is stored in
    class CL_DEF_IM_XSS_REM_INTERFACE. If you go to SE24, enter this
    class and then select method PROVIDE_FILTERED_RGDIR, you will be able to
    see the default implementation regarding the 3 days I mentioned before:
    method IF_EX_XSS_REM_INTERFACE~PROVIDE_FILTERED_RGDIR .
    DATA: newest_date LIKE sy-datum.
    ex_filtered_rgdir] = im_in_rgdir[.
    CLEAR ex_message.
    remove all in-periods where not:
    a) paydt is at the past
    b) paydt is in the near future (3 days)
    newest_date = sy-datum + 3.
    DELETE ex_filtered_rgdir WHERE paydt GE newest_date.
    Please, when implementing this BADI do not forget to mantain the other
    methods as explained in note 901850.

  • Smartform data in pdf format

    Hi all,
                 I want to extract the data from the invoice smartform and i should display it in pdf format.I have invoice number with me as input parameter.
    Can any  one solve my problem...it is urgent plz.........
    Thanks ,
    Rakesh.

    hi
    good
    please check this code
    By using FM we can convert smartform to PDF like CONVERT_PDF
    and GUI_DOWNLOAD.
    *& Report ZSRI_RE_02
    REPORT ZSRI_RE_02.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETER: P_DATE LIKE SY-DATUM.
    PARAMETER: P_REA TYPE CHAR255.
    SELECTION-SCREEN:END OF BLOCK B1.
    *DATA:WS_UCOMM LIKE SY-UCOMM.
    DATA FORM_NAME TYPE rs38L_fnam.
    DATA: WA_CTRLOP TYPE SSFCTRLOP,
    WA_OUTOPT TYPE SSFCOMPOP.
    DATA: T_OTFDATA TYPE SSFCRESCL,
    T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i.
    DATA: w_bin_filesize TYPE i.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZSRI_FORM_01'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = 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.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION FORM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = WA_CTRLOP
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS = WA_OUTOPT
    USER_SETTINGS = 'X'
    MYDATE = P_DATE
    REASON = P_REA
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO = T_OTFDATA.
    JOB_OUTPUT_OPTIONS =
    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.
    t_otf[] = t_otfdata-otfdata[].
    *Convert into PDF
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = w_bin_filesize
    BIN_FILE =
    TABLES
    OTF = T_OTF
    LINES = T_PDF_TAB
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    ERR_BAD_OTF = 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.
    To download into PC
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_BIN_FILESIZE
    CODEPAGE = ' '
    FILENAME = 'D:\SRI2.PDF'
    FILETYPE = 'BIN'
    MODE = ' '
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    COL_SELECT = ' '
    COL_SELECTMASK = ' '
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH = W_FILESIZE
    TABLES
    DATA_TAB = T_PDF_TAB.
    FIELDNAMES =
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

  • Hi my question abt 2 convert a list into pdf format

    hi
    experts
    i had problem to convert displayed list into pdf format showing an error cannot open the file file format not supported, but i am have downloaded the file in .pdf format
    please help me
    thank you all

    Hi,
    check out this program. this might help:
    report zabap_pdf.
    tables:
      tsp01.
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i,
      mi_rqident       like tsp01-rqident.
    *-- INTERNAL TABLES
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    *-- SELECTION SCREEN
    parameters:
      p_repid like sy-repid, " Report to execute
      p_linsz like sy-linsz default 132, " Line size
      p_paart like sy-paart default 'X_65_132'.  " Paper Format
    start-of-selection.
    concatenate 'c:\'
                p_repid
                '.pdf'
      into mc_filename.
    *-- Setup the Print Parmaters
      call function 'GET_PRINT_PARAMETERS'
       exporting
         authority= space
         copies   = '1'
         cover_page                   = space
         data_set = space
         department                   = space
         destination                  = space
         expiration                   = '1'
         immediately                  = space
         in_archive_parameters        = space
         in_parameters                = space
         layout   = space
         mode     = space
         new_list_id                  = 'X'
         no_dialog= 'X'
         user     = sy-uname
       importing
         out_parameters               = mstr_print_parms
         valid    = mc_valid
       exceptions
         archive_info_not_found       = 1
         invalid_print_params         = 2
         invalid_archive_params       = 3
         others   = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      if mstr_print_parms-pdest = space.
        mstr_print_parms-pdest = 'LOCL'.
      endif.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      mstr_print_parms-linsz = p_linsz.
      mstr_print_parms-paart = p_paart.
      submit (p_repid) to sap-spool without spool dynpro
                       spool parameters mstr_print_parms
                       via selection-screen
                       and return.
    *-- Find out what the spool number is that was just created
      perform get_spool_number using sy-repid
                 sy-uname
        changing mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid= mi_rqident
          no_dialog  = space
          dst_device = mstr_print_parms-pdest
        importing
          pdf_bytecount                  = mi_bytecount
        tables
          pdf        = mtab_pdf
        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.
    call function 'DOWNLOAD'
         exporting
              bin_filesize            = mi_bytecount
              filename                = mc_filename
              filetype                = 'BIN'
         importing
              act_filename            = mc_filename
         tables
              data_tab                = mtab_pdf.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    form get_spool_number using f_repid
         f_uname
                    changing f_rqident.
      data:
        lc_rq2name like tsp01-rq2name.
      concatenate f_repid+0(8)
                  f_uname+0(3)
        into lc_rq2name separated by '_'.
      select * from tsp01 where  rq2name = lc_rq2name
      order by rqcretime descending.
        f_rqident = tsp01-rqident.
        exit.
      endselect.
      if sy-subrc ne 0.
        clear f_rqident.
      endif.
    endform." get_spool_number

Maybe you are looking for

  • How to divide the video into frames?

    Hi I need to get the frames from a video file.There is a option j2me for getting one frame(getSnapshot) and at the maximum of ten frames using snapCtrl. By using snapctrl i can take only ten pictures.when snapctrl is executed the first ten frames get

  • Materialized View Refresh issue

    Hi I created a mv with refresh on demand then created log on it then created aother mv using the 1st mv. Did the the fast refresh on the 1st view that works fine then I did the fast refresh on the child mv its failing with the following error ORA-120

  • Write the syntax for declaring table control in dialog programming?

    1) Write the syntax for declaring table control in dialog programming? 2) Write the syntax to call a selection screen in a modal dialog box?

  • Error while completing Wait for event step

    Hi Gurus, I have a Workflow developed which has a "Wait for Event" step. In that step,I am facing a problem .It seems the step is not getting completed properly. When I check in SWEL it shows the Event is triggered.But the next which is a 'Send Mail'

  • MobileMe Family Pack

    Are the calendars and contacts separate for each individual user? Example: 5 users, each with own computer using Outlook and own iPhone, will each users Outlook sync with each users iPhone individually? Is the MobileMe online calendar separate also?