Saving PDF file into application server

Dear all,
My requirement is retrieving a PDF file from application server and modifying the document and saving it back to the application server through BSP application.
I've retrieved the data from the application server and displayed it in the frame of BSP layout and modified the same (adding signature). We got stuck in saving back the signed document into the application server.
Can anyone guide me in saving back the modified document or how to get the modified file content through BSP.
Regards
Srini

Hi Friend,
Hope these  links will help you ,
File Upload in BSP Applications and store in Application server
Re: How to Upload .TXT, BITMAP, .PDF files into a Data base Table.
Re: sapscript - pdf
With Regards,
SHARMILA BRINDHA.M

Similar Messages

  • Write PDF file into application server.

    Hi Gurus,
    I have created a smartform and converted into PDF using function module as given below. Now I want to write this generated PDF file into application server. I am not generating any spool request too. How can I proceed from here?  Pls advice..
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize                 = lv_bin_filesize
        TABLES
          otf                              = ls_job_output_info-otfdata
          doctab_archive         = lt_docs
          lines                           = lt_lines
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
    Thanks..
    Saj

    transfer all the data from ur itabs to one final itab declared as follow
    DATA: BEGIN OF final_itab OCCURS 0,
                     document  TYPE string,
               END OF final_itab.
    then finally,
    OPEN DATASET 'yourfile.pdf' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      len = strlen( final_itab-DOCUMENT ).
      TRANSFER final_itab-DOCUMENT  TO 'yourfile.pdf'  LENGTH len.
    CLOSE DATASET 'yourfile.pdf'.
    This ends the coding mate.
    Enjoy it n have a good day.
    Cheers

  • Move pdf file into application server

    Hi ABAP Gurus,
    i want your valuable help in solving my problem.
       i tried to create PDF file in application server and its creating as
    PDF file in Application server..but i am unable to see the content in text ,
    instead it is displaying in binary content...but when i tried to create
    in presentation server i am able to see it as text in PDF file....
    Can u please let me know whats wrong in my work and how to create a PDF file
    in Application server with text content
    with regards,
    Gowri.

    Hi Gowri,
    Check this example....
    report ztest.
    data: begin of itab occurs 0,
    field(256),
    end of itab.
    data: dsn(100) value '/usr/sap/xfr/FIS/testpdf',
    length like sy-tabix,
    lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
    exporting
    filename = 'c:\temp\test.pdf'
    filetype = 'BIN'
    importing
    filelength = length
    tables
    data_tab = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
    transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear itab.
    refresh itab.
    *- To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
    read dataset dsn into itab-field.
    if sy-subrc = 0.
    append itab.
    else.
    exit.
    endif.
    enddo.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = 'c:\temp\testn.pdf'
    filetype = 'BIN'
    bin_filesize = length
    importing
    filelength = lengthn
    tables
    data_tab = itab.
    Or
    Use the TCode
    CG3Z or CG3Y
    for downloading to Application Server.
    Thanks,
    Reward If helpful.

  • PDF file into application server

    Hi all,
    How to upload a PDF file into an application server.
    Urgent pls help.
    rgds
    Sarvana

    hi use this...,
    REPORT ZMN_PDF_UPLOAD.
    data: begin of itab occurs 0,
    field(256),
    end of itab.
    data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\testpdf',
    length like sy-tabix,
    lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
    exporting
    filename = 'c:\temp\test.pdf'
    filetype = 'BIN'
    importing
    filelength = length
    tables
    data_tab = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
    transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear itab.
    refresh itab.
    *To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
    read dataset dsn into itab-field.
    if sy-subrc = 0.
    append itab.
    else.
    exit.
    endif.
    enddo.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = 'c:\temp\testn.pdf'
    filetype = 'BIN'
    bin_filesize = length
    importing
    filelength = lengthn
    tables
    data_tab = itab.
    *Or
    *Use the TCode
    *CG3Z or CG3Y
    *for downloading to Application Server.
    regards,
    venkat.

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • How to Post a file(Flat File ) into Application server of the XI(AL11)?

    How to Post a file(Flat File ) into Application server of the XI(AL11)?
    Best Regards,
    Jose

    Hi,
    1) goto SXDA_TOOLS Transaction code
    2) Provide the Following details
    Object Type : DXPROJECT
    Program Type: BAPI
    Program/Method: CREATE
    3) Click on Copy Button
    4) Select the Source as Presentation Server
         a) Select  the File where you saved in your Local machine
    5) Select the Target as Application server
         a) Check the check box Remote Server
         b) Select the File type as Physical
         c) In File name give /usr/sap/SSD/DVEBMGS00/work\Your file name (This the Server path                                                                               
    Where the file is going to save)
    6) Click on Continue
    Go to AL11 and check whether the File has been create in the following path  /usr/sap/SSD/DVEBMGS00/work
    Provide this path in the Communication channel path when you select the Transport Protocol as NFS and you place the file in AL11 directory.
    Regards
    Seshagiri

  • Issue with Uploading OTF converted PDF file on application server...

    Hello Gurus,
    I want to download otf converted pdf data on application server. I am using following but it does not work ?
    data: i_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
            wa_pdf_tab like tline,
    CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
          max_linewidth         = 132
        IMPORTING
          BIN_FILESIZE          = w_bin_filesize
        TABLES
          OTF                   = I_OTFDATA
          LINES                 = i_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.
      concatenate './' 'ARCH_' SY-DATUM '_' SY-UZEIT INTO FILENAME.
      OPEN DATASET FILENAME FOR output in text mode encoding default.
      loop at i_pdf_tab INTO wa_pdf_tab.
        TRANSFER wa_pdf_tab TO FILENAME .
      ENDLOOP.
    CLOSE DATASET FILENAME.
    After this I am using CG3Y to downlaod the file created on application server to front end with "Transfer format data" as BIN.
    But it dos not work. 
    Please hlep.
    Regards,
    Rajesh.

    Instead of CG3Y use this code.
    DATA : p_sour TYPE string VALUE '\\usr\sap\trans\tmp\test.pdf',
           p_dest TYPE string VALUE 'c:\test.pdf'.
    CALL METHOD cl_gui_frontend_services=>file_copy
      EXPORTING
        SOURCE               = p_sour
        destination          = p_dest
        overwrite            = SPACE

  • Download PDF file from Application Server in BSP

    Hello,
    We have a requirement on which we want to download a PDF file stored in Application server using BSP application. I have used function module  ARCHIVFILE_SERVER_TO_CLIENT but this FM will help only if i want to download file from GUI it won't work in BSP application.
    Further i have used class CL_BSP_UTILITY and download method to download file from application server but it is not working in desired manner.
    I am attaching my code for your reference:
    DATA: BUTTON_EVENT TYPE REF TO CL_HTMLB_EVENT_BUTTON ,
               EVENT TYPE REF TO IF_HTMLB_DATA.
    DATA: LS_HOURS LIKE LINE OF GT_HOURS.
    DATA STR TYPE STRING.
    DATA: OUTPUT TYPE STRING ,
              L_XSTRING TYPE XSTRING ,
               APP_TYPE TYPE STRING. 
    EVENT = CL_HTMLB_MANAGER=>GET_EVENT( REQUEST ).
    DATA PHY_NAME_OUT     TYPE SAPB-SAPPFAD.
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME = HTMLB_EVENTS=>BUTTON .
      BUTTON_EVENT ?= EVENT .
      CASE EVENT->EVENT_SERVER_NAME.
        WHEN 'test' .
          IF GT_HOURS IS NOT INITIAL.
            PHY_NAME_OUT = '/usr/sap/put/form16//01000200_2007.PDF'.
          OPEN DATASET PHY_NAME_OUT FOR INPUT IN TEXT MODE ENCODING DEFAULT.
            IF SY-SUBRC IS INITIAL.
              DO.
                READ DATASET PHY_NAME_OUT INTO STR.
                IF SY-SUBRC IS INITIAL.
                CONCATENATE
                    OUTPUT
                    str
                    cl_abap_char_utilities=>cr_lf
    INTO output SEPARATED BY space. "cl_abap_char_utilities=>horizontal_tab
                ELSE.
                  EXIT.
                ENDIF.
              ENDDO.
            ENDIF.
    *LOOP AT gt_hours INTO ls_hours.
    *CONCATENATE
    *OUTPUT
    *ls_hours-hour
    *cl_abap_char_utilities=>cr_lf
    *INTO output SEPARATED BY space. "cl_abap_char_utilities=>horizontal_tab
    *ENDLOOP.
            APP_TYPE = 'APPLICATION/PDF;charset=utf-16le'.
            CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
              EXPORTING
                TEXT     = OUTPUT
                MIMETYPE = 'APPLICATION/PDF;charset=utf-16le'
              IMPORTING
                BUFFER   = L_XSTRING.
            CONCATENATE CL_ABAP_CHAR_UTILITIES=>BYTE_ORDER_MARK_LITTLE
            L_XSTRING
            INTO L_XSTRING IN BYTE MODE.
            CALL METHOD CL_BSP_UTILITY=>DOWNLOAD
            EXPORTING
            OBJECT_S = L_XSTRING
            CONTENT_TYPE = APP_TYPE
            CONTENT_DISPOSITION = 'attachment;filename=webforms.pdf'
            RESPONSE = _M_RESPONSE
            NAVIGATION = NAVIGATION.
          ENDIF.
      ENDCASE.
    ENDIF.
    From this code i am able to download PDF file but it is not opening in local machine.
    If any other way to download file then please suggest.
    waiting for ur reply.
    Regards,
    Gagan

    Hi,
    you do the file reading wrong:
    have a look at:
    Local declarations.
      data:
        components          type stringtab,
        component           type string,
        path                type text255,
        file                type text255,
        line_length         type i,
       filecontent_binary type sdokcntbin,
        rows                type sytabix,
        content             type sdokcntbin,
        exception           type ref to cx_sy_file_access_error,
        exception_tmf       type ref to cx_sy_too_many_files ,
        block_size          type i value 1022,
        length              type i.
      field-symbols:
        <hex_container>     type x.
      constants:
        c_dms_blk_size      type i value 2550.
      clear file_size.
      try.
          open dataset file_name  for input in binary mode message message.
        catch cx_sy_file_open  into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when '41825AD355C3005E000000000A1551B1'. raise open_error.
            when '47E8B03AECE5BA07E10000000A114829'. raise already_open.
            when others.
          endcase.
        catch cx_sy_file_authority into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when 'A70BB8396F051547E10000000A11447B'. raise authority_error.
            when others.
          endcase.
        catch cx_sy_too_many_files into exception_tmf.
          case exception_tmf->textid.
            when '8708B73915F6B645E10000000A11447B'. raise too_many_files.
            when others.
          endcase.
      endtry.
      do.
        try.
            read dataset file_name into filecontent_binary-line.
            if sy-subrc <> 0.
              add  line_length to file_size.
              append filecontent_binary to file_content_binary.
              exit.
            else.
              add  line_length to file_size.
              append filecontent_binary to file_content_binary.
            endif.
          catch cx_sy_file_open_mode into exception.
            case exception->textid.
              when '9207B73915F6B645E10000000A11447B'. raise cx_sy_file_open_mode.
              when '9807B73915F6B645E10000000A11447B'. raise read_only.
              when '9E07B73915F6B645E10000000A11447B'. raise not_open.
              when '409D273A2D824360E10000000A11447B'. raise incompatible_mode.
              when others.
            endcase.
        endtry.
      enddo.
      try.
          close dataset file_name.
        catch cx_sy_file_close into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when 'C10BB8396F051547E10000000A11447B'. raise close_error.
            when others.
          endcase.
        catch cx_sy_file_access_error into exception.
          case exception->textid.
            when '4182174D03030063000000000A1551B1'. raise access_error.
            when others.
          endcase.
      endtry.
    Get file size.
      split file_name at '/' into table components.
      describe table components lines sy-tfill.
      read table components into component index sy-tfill.
      path = file_name.
      replace component in path with ''.
      file = component.
      call function '/EUH/MMS_GET_FILE_SIZE'
        exporting
          dir_name  = path
          file_name = file
        importing
          file_size = file_size.
    and function /euh/mms_get_file_size.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(DIR_NAME) TYPE  TEXT255
    *"     VALUE(FILE_NAME) TYPE  TEXT255
    *"  EXPORTING
    *"     VALUE(FILE_SIZE) TYPE  SDOK_FSIZE
    *"  EXCEPTIONS
    *"      NO_AUTHORITY
    *"      ACTIVITY_UNKNOWN
    *"      NOT_A_DIRECTORY
    *"      NO_MEDIA_IN_DRIVE
    *"      TOO_MANY_ERRORS
    *"      TOO_MANY_FILES
    *"      BRACKET_ERROR_IN_FILENAME
    *"      NO_SUCH_PARAMETER
      types: begin of files,
               line like ocs_file,
             end of files.
      data: file type files,
         f_subrc like sy-subrc value 0,
         errno(3)    type c,
         errmsg(40)  type c,
         pos                        type i,
         len                        type i,
         parameter(120)             type c,
         help1(120)                 type c,
         help2(120)                 type c,
         error_counter              type i.
      data:
        dir_list  like  ocs_file occurs 0 with header line.
    CASE sy-subrc.
       WHEN 1. f_subrc = 64.
       WHEN 2. f_subrc = 65.
       WHEN 0.
      search dir_name for 'SY-HOST'.    "Is SY-HOST used in directory name?
      if sy-subrc = 0.
        pos = sy-fdpos + 7.
        move dir_name(sy-fdpos) to help1.
        move dir_name+pos to help2.
        concatenate help1 sy-host help2 into dir_name.
      endif.
      do 12 times.                                 " To avoid endless loop
        if dir_name cs '$('.           " Replace parameter by their value
          pos = sy-fdpos + 2.
          if dir_name cs ')'.
            len = sy-fdpos - pos.
            if len le 0.
              f_subrc = 4. exit.
            else.
              parameter = dir_name+pos(len).
              call 'C_SAPGPARAM' id 'NAME'  field parameter
                               id 'VALUE' field parameter.
              if sy-subrc = 0.
                len = pos + len + 1.
                pos = pos - 2.
                if pos > 0.
                  move dir_name(pos) to help1.
                else.
                  help1 = ''.
                endif.
                pos = strlen( dir_name ).
                if pos > len.
                  move dir_name+len to help2.
                else.
                  help2 = ''.
                endif.
                concatenate help1 parameter help2 into dir_name.
              else.
                f_subrc = 8. exit.
              endif.
            endif.
          else.
            exit.
          endif.
        else.
          exit.
        endif.
      enddo.
      shift dir_name right deleting trailing '/\ '.
      shift dir_name left deleting leading space.
      call 'C_DIR_READ_FINISH'                      " this is from RSWATCH0
            id 'ERRNO'  field errno
            id 'ERRMSG' field errmsg.
      call 'C_DIR_READ_START'
            id 'DIR'    field dir_name
            id 'FILE'   field file_name
            id 'ERRNO'  field errno
            id 'ERRMSG' field errmsg.
      case sy-subrc.
        when 1.
          case errno.
            when 2 or 20.  f_subrc = f_subrc + 66.
            when ' '. f_subrc = f_subrc + 67.
          endcase.
        when 0.
          clear error_counter.
          do.
            clear file.
            clear dir_list.
            call 'C_DIR_READ_NEXT'
                id 'TYPE'   field file-line-type
                id 'NAME'   field file-line-name
                id 'LEN'    field file-line-len
                id 'OWNER'  field file-line-owner
                id 'MTIME'  field file-line-mtime
                id 'MODE'   field file-line-acc_mode
                id 'ERRNO'  field errno
                id 'ERRMSG' field errmsg.   "sy-subrc = 3 is e.g. if return
            if sy-subrc = 0 or sy-subrc = 3."data do not fit into variables
              perform p6_to_date_time_tz(rstr0400) using
                    file-line-mtime
                    file-line-mod_time
                    file-line-mod_date.
              file_size = file-line-len.
              dir_list = file-line.
              append dir_list.
            elseif sy-subrc = 1.                 " nothing (more) found
              exit.
            else.
              if error_counter > 50.
                call 'C_DIR_READ_FINISH'
                    id 'ERRNO'  field errno
                    id 'ERRMSG' field errmsg.
                pos =  f_subrc mod 2.
                if pos = 0. f_subrc = f_subrc + 1. endif.
                exit.
              endif.
              add 1 to error_counter.
            endif.
            if sy-index > 1000.
              pos =  f_subrc mod 4.
              if pos = 0. f_subrc = f_subrc + 2. endif.
              exit.
            endif.
          enddo.
          call 'C_DIR_READ_FINISH'
               id 'ERRNO'  field errno
               id 'ERRMSG' field errmsg.
          if sy-opsys(3) = 'Win' and not ( file_name cs '*' ).
            describe table dir_list lines len.
            if len = 0.
              help1 = file_name.
              translate help1 to upper case.
              translate help1 using
                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
              call 'C_DIR_READ_START'
                    id 'DIR'    field dir_name
                    id 'FILE'   field help1.
              if sy-subrc = 0.
                clear error_counter.
                do.
                  clear file.
                  clear dir_list.
                  call 'C_DIR_READ_NEXT'
                      id 'TYPE'   field file-line-type
                      id 'NAME'   field file-line-name
                      id 'LEN'    field file-line-len
                      id 'OWNER'  field file-line-owner
                      id 'MTIME'  field file-line-mtime
                      id 'MODE'   field file-line-acc_mode
                      id 'ERRNO'  field errno
                      id 'ERRMSG' field errmsg.
                  if sy-subrc = 0 or sy-subrc = 3.
                    help2 = file_name.
                    translate help2 to upper case.
                    help1 = file-line-name.
                    translate help1 to upper case.
                    if help1 = help2.
                      perform p6_to_date_time_tz(rstr0400) using
                         file-line-mtime
                         file-line-mod_time
                         file-line-mod_date.
                      dir_list = file-line.
                      append dir_list.
                    endif.
                  elseif sy-subrc = 1.
                    exit.
                  else.
                    if error_counter > 50.
                      call 'C_DIR_READ_FINISH'
                          id 'ERRNO'  field errno
                          id 'ERRMSG' field errmsg.
                      pos =  f_subrc mod 2.
                      if pos = 0. f_subrc = f_subrc + 1. endif.
                      exit.
                    endif.
                    add 1 to error_counter.
                  endif.
                  if sy-index > 1000.
                    pos =  f_subrc mod 4.
                    if pos = 0. f_subrc = f_subrc + 2. endif.
                    exit.
                  endif.
                enddo.
                call 'C_DIR_READ_FINISH'
                     id 'ERRNO'  field errno
                     id 'ERRMSG' field errmsg.
              endif.
            endif.
          endif.
      endcase.
    ENDCASE.
    CASE f_subrc.
       WHEN 1 OR 3.             RAISE too_many_errors.
       WHEN 2.                  RAISE too_many_files.
       WHEN 4 OR 5 OR 6 OR 7 OR 70 OR 71.
         RAISE bracket_error_in_filename.
       WHEN 8 OR 9 OR 10 OR 11 OR 74 OR 75.
         RAISE no_such_parameter.
       WHEN 64.                 RAISE no_authority.
       WHEN 65.                 RAISE activity_unknown.
       WHEN 66.                 RAISE not_a_directory.
       WHEN 67.                 RAISE no_media_in_drive.
    ENDCASE.
    endfunction.
    Now you will be able to get the filesize and the file in SDOK format sdokbin.
    Okay.
    You have to build an request and push the content to the user like:
      call method server->response->set_header_field( name = 'Content-Type' value = value ).
      describe field file_content_binary-line length line_length in byte mode.
      bytes_rest = file-size.
      loop at file_content_binaries assigning <file_content_binary>.
        move <file_content_binary>-line to data.
        if bytes_rest <= 0. "mismatch between line values and size
          exit.
        endif.
        if bytes_rest >= line_length.
          call method server->response->append_data( data = data
            length = line_length ).
        else.
          call method server->response->append_data( data = data
            length = bytes_rest ).
        endif.
        bytes_rest = bytes_rest - line_length.
      endloop.
    This will work.
    You can set the header fields like you want. Have also a look at sicf node contentserver
    and its handler: CL_HTTP_EXT_CSIF

  • To access pdf files from application server using web.show_document

    Hello!
    If my pdf file is copied in Oracle_home/forms90/java directory.Then using web.show_document i can access the pdf file.But I can't copy all the pdf files in /forms90/java directory.We have lacs of pdf files which I want to keep in my own directory.But my requirement is if my pdf file is in /home2/docs directory in (Linux application server) ie in my own directory where I store all the pdf files.Then web.show_document does not open the pdf file.It says page cannot be displayed.For that I think we have to configure the directory /home2/docs directory as a webserver.From otn I got something like forms90.conf file in application server where we have to set virtual directory mapping etc.If the pdf is in local machine then in orion-web.xml file we have to mention real path and save the file and shutdown oc4j instance and restart it again.I tried it.But it is not working.Can u give me step by step instructions to solve this problem.I found a few links in discussion forum.But is doesn't work out.My pdf file is in /home2/docs directory in Linux application server.Please treat it as urgent.
    Regards
    Jayashree

    Hi Sandeepmsandy,
    There is no available code sample for this scenario. You may write your own.
    Step 1: Get pdf URL from sqlite database. Please refer to the following MSDN blog and see a code sample.
    http://blogs.msdn.com/b/robertgreen/archive/2012/11/13/using-sqlite-in-windows-store-apps.aspx. Note, you need to retarget the project to 8.1 and then get two sqlite packages from NuGet before building this sample.
    Step 2: Use some special classes to get file from serer.
    HttpWebRequest can help download small pdf files. For more information to see
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/de96a61c-e089-4595-8349-612be5d23ee6/download-file-with-httpwebrequest?forum=winappswithcsharp. It’s easy for use, but if you want to download the larger or many files, it’s recommend to use
    BackgroundTransfer namespace. The classes in this namespace provide a power way to transfer files in the background. See a code sample from MSND.
    https://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Special characters downloading file into application server

    Dear Friends,
    i have to download records into excel sheet through back ground job, while downloading records into applications server.
    all records are downloading properly up to here fine but some special characters also downloading. i had downloaded same records in debugging mode from the same internal table here no special characters.
    i found that the structure(standard ( /SCWM/S_LIME_ALL_MON )) which is being used in that some fields are defined as RAW data type this may be the problem.but i tried to convert them using some function modules no result getting dump only.
    i am using data sets to download data into application server here gui_download will not work because it is back ground job.
    can any one please help me in this. its urgent...
    please please help me in this it has been pending since DEC-01-11.
    extra characters like (  #v#M?LQia#####
    #v#M?LQia#####
    #v#)
    my code
      open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
      IF sy-subrc EQ C_ZERO.
        LOOP AT LT_TAB INTO WA_TAB.
          transfer WA_TAB to LV_FLNAM.
        ENDLOOP.
        CLOSE DATASET LV_FLNAM.
      ENDIF.
    Edited by: sairam.kusuma on Dec 16, 2011 6:26 AM
    Edited by: sairam.kusuma on Dec 16, 2011 6:38 AM
    Edited by: sairam.kusuma on Dec 16, 2011 6:39 AM

    TYPES:BEGIN OF ty_stru,
          LGTYP  TYPE /SCWM/LGTYP,
          LGPLA  TYPE /SCWM/LGPLA,
          MATNR  TYPE /SCWM/DE_MATNR,
          MAKTX  TYPE /SCWM/DE_UI_MAKTX,
          QUAN(13)  TYPE C,"/SCWM/DE_UI_QUAN,
          UNIT  TYPE /SCWM/DE_BASE_UOM,
          CAT  TYPE /SCWM/DE_CAT,
          CAT_TXT  TYPE /SCWM/DE_CAT_TXT,
          CHARG  TYPE /SCWM/DE_CHARG,
          OWNER  TYPE /LIME/OWNER,
          ENTITLED  TYPE /SCWM/DE_ENTITLED,
          UI_WDATT  TYPE /SCWM/DE_UI_WDATT,
          UI_WDATU  TYPE /SCWM/DE_UI_WDATU,
          SKZSI  TYPE /SCWM/LQUA_SKZSI,
          QUANA(13)  TYPE C,"/SCWM/DE_UI_QUAN_PACKED,
          ALTME  TYPE /SCWM/DE_AUNIT,
          ITMNO  TYPE /SCDL/DL_ITEMNO,
          WEIGHT(15)  TYPE C,"/SCWM/DE_NWEIGHT,
          UNIT_W  TYPE /SCWM/DE_WGT_UOM,
          VOLUM(15)  TYPE C,"/SCWM/DE_NVOLUME,
          UNIT_V  TYPE /SCWM/DE_VOL_UOM,
          CAPA(15)  TYPE C,"/SCWM/DE_CAPAUSE,
          SN_STOCK  TYPE /SCWM/DE_SER_STOCK,
          END OF ty_stru.
    DATA: LV_LGNUM TYPE /SCWM/LGNUM VALUE 'R10',
          LV_FLNAM TYPE rlgrap-filename VALUE '/tmp/RAMA.xls'.
    CONSTANTS: C_ZERO TYPE I VALUE '0'.
    DATA: LT_TAB TYPE STANDARD TABLE OF /SCWM/S_LIME_ALL_MON,
          WA_TAB TYPE /SCWM/S_LIME_ALL_MON,
          i_stru TYPE STANDARD TABLE OF ty_stru,"
          wa_stru TYPE ty_stru.
    REFRESH LT_TAB.
    CLEAR: WA_TAB.
    *this is modified function module from /SCWM/S_LIME_ALL_MON
    CALL FUNCTION 'ZEWM_F_PHYSICAL_INVENTORY_STOC'
      EXPORTING
        IV_LGNUM             = LV_LGNUM
      IV_VARIANT           =
      IV_MODE              = '1'
      IT_DATA_PARENT       =
      IMPORTING
        ET_DATA              = LT_TAB
      EV_RETURNCODE        =
      EV_VARIANT           =
    CHANGING
      CT_TAB_RANGE         =
    i have to download what are the fields defined as structure.
    1)when ever i am using the internal table(LT_TAB) to download getting specials characters(####) with all records for the fields QUAN, QUANA, WEGHT,VOLUM and CAPA.
    open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
    IF sy-subrc EQ C_ZERO.
      CLEAR: WA_stru,
             wa_tab.
      LOOP AT LT_TAB INTO WA_TAB.
        transfer WA_TAB to LV_FLNAM.
        CLEAR: WA_TAB.
      ENDLOOP.
      CLOSE DATASET LV_FLNAM.
    ENDIF.
    2)if i take another internal table with converting them as char file is downloading with out special characters but it is downloading single line only but not the hole data.
    if i have the below code getting only single line records not total records without special characters.
    open DATASET LV_FLNAM for OUTPUT in LEGACY BINARY MODE .
    IF sy-subrc EQ C_ZERO.
      CLEAR: WA_stru,
             wa_tab.
      LOOP AT LT_TAB INTO WA_TAB.
         wa_stru-LGTYP = wa_tab-LGTYP.
         wa_stru-LGPLA = wa_tab-LGPLA.
         wa_stru-MATNR = wa_tab-MATNR.
         wa_stru-MAKTX = wa_tab-MAKTX.
         wa_stru-QUAN = wa_tab-QUAN.
         wa_stru-UNIT = wa_tab-UNIT.
         wa_stru-CAT = wa_tab-CAT.
         wa_stru-CAT_TXT = wa_tab-CAT_TXT.
         wa_stru-CHARG = wa_tab-CHARG.
         wa_stru-OWNER = wa_tab-OWNER.
         wa_stru-ENTITLED = wa_tab-ENTITLED.
         wa_stru-UI_WDATT = wa_tab-UI_WDATT.
         wa_stru-UI_WDATU = wa_tab-UI_WDATU.     
         wa_stru-SKZSI = wa_tab-SKZSI.
         wa_stru-QUANA = wa_tab-QUANA.
         wa_stru-ALTME = wa_tab-ALTME.
         wa_stru-ITMNO = wa_tab-ITMNO.
         wa_stru-WEIGHT = wa_tab-WEIGHT.
         wa_stru-UNIT_W = wa_tab-UNIT_W.
         wa_stru-VOLUM = wa_tab-VOLUM.
         wa_stru-UNIT_V = wa_tab-UNIT_V.
         wa_stru-CAPA = wa_tab-CAPA.
         wa_stru-SN_STOCK = wa_tab-SN_STOCK.
        transfer WA_stru to LV_FLNAM.
        CLEAR: WA_stru.
      ENDLOOP.
      CLOSE DATASET LV_FLNAM.
    ENDIF.

  • Payment advice(F110) to be saved as file in application server

    Hi Experts
    my requirement is i have to send the payment advice created from F110 to respective vendors as mail in Alias name and i am able to send it succes fully with BTE2040. but the client came up with new requirement that we have to save this payment advice form send to vendor in applicattion server in the same format ( i.e., PDF form). i tried searching for any user exit (or) BTE but couldnot get so, can you please give my your suggetion, how to achive this task.

    1.You can send and save the pdf form in the same BTE EVENT 2040.
    2.How to save the PDF-BASED form to application server.
       Transaction CG3Z for uploading file to application server
       Transaction CG3Y for downloading file from application server
       I think you can use BDC to revord CG3Z and then use it in code of BTE2040.

  • Function Module for putting Flat File into Application Server

    Hi Pals,
         what is the   Function module for putting my flatfile into application server..
    because i dont have  authorizations to  put my flatfile  into application server directly..
    I know one function mudule is there for that ...so,  can you suggest me.. what is the function module... for that..
    thanks.. and points will be assigned..
    chitti

    Hi,
    well normally you use the method GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES to upload a file from your client pc. Then you use the abap statements open dataset, transfer and close dataset to put the file to the app-server.
    kind regards
    Siggi

  • Saving .pdf file into .jpeg - not displaying text boxes

    When I save my Adobe Acrobat Pro 8 .pdf file into .jpeg format and open it, it does not display of the text boxes, comments etc. Thanks

    Look at your other thread.

  • Error when deploying war file into application server

    I wrote a web service in java using RAD and managed to check it using a web service client with no errors.
    However, after creating a war file and tried to deploy this into the Sun application server, the following can be seen at the application server console:
    Deploying application in domain failed; Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception ; requested operation cannot be completed Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    In the server.log file, the following appears:
    loyment|_ThreadID=13;|DPL5035:Error while running ejbc
    com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- j axrpc compilation exception
    at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.accept(JaxRpcRICodegen.java:206 )
    at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1101 )
    at com.sun.enterprise.deployment.Application.visit(Application.java:1346)
    at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.run(JaxRpcRICodegen.java:103)
    at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:785)
    at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:563)
    at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:42 7)
    at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:213)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:967)
    at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java :193)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.j ava:140)
    at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:146)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.ja va:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentS ervice.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService. java:188)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService. java:520)
    at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:143)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:172)
    |#]
    [#|2007-11-14T11:21:10.083+0930|INFO|sun-appserver-ee8.1_02|javax.enterprise.system.tools.deploy ment|_ThreadID=13;|Total Deployment Time: 14145 msec, Total EJB Compiler Module Time: 0 msec, Po rtion spent EJB Compiling: 0%|#]
    [#|2007-11-14T11:21:10.116+0930|SEVERE|sun-appserver-ee8.1_02|javax.enterprise.system.tools.depl oyment|_ThreadID=13;|Exception occured in J2EEC Phase
    com.sun.enterprise.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.accept(JaxRpcRICodegen.java:206 )
    at com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1101 )
    at com.sun.enterprise.deployment.Application.visit(Application.java:1346)
    at com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.run(JaxRpcRICodegen.java:103)
    at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:785)
    at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:563)
    at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:42 7)
    at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:213)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:967)
    at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java :193)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.j ava:140)
    at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:146)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.ja va:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentS ervice.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService. java:188)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService. java:520)
    at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:143)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:172)
    |#]

    I got a similar error deploying to Weblogic with JBuilder 6 and it proved to be
    the Manifest.mf file inside war, which is very sensitive to CLASSPATH entry. Finally
    I used the file generated by JBuilder and it worked ...
    Stefan
    Frank Sun <[email protected]> wrote:
    Hi, this is Frank.
    I have a war file and want to deploy it. but somehow I got java.lang.StringIndexOutOfBoundsException:
    String index out of range: -1
    error
    Would anyone please help me?
    This war file is able to be deplyed using Tomcat 4.0.3.
    Please help.

  • Generate pdf file on application server

    Hi.
    I want to get an pdf file on the application server. i use a new output device "PDF_PRINT" with the device type "PDF1".
    I get files pdf files on the front-end after input filename in the c:\windows\system32 folder, but i need the files on the application server. where can i control the filename and the destination?
    with the host spool access method? and the filename???

    Hi,
    can you look at this
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e71cd560-0a01-0010-18a2-a7391f56b4f4?overridelayout=true]
    Regards,
    Muralidhar

Maybe you are looking for

  • Vendor prepayment

    Hi Experts, The user created a Vendor Invoice  KR (FB01)  as to make a pre-payment.  They already made a payment. They also created PO for same and now they are trying to clear KR document so that it will not be a duplicate payment.  When an invoice

  • Pages works real slow

    Hello, I'm a Computer Science student and I write all my assignments in Pages, I use a lot MathType in my documents to enter equations. Pages gets really really slow and lagging when typing and moving the cursor after filling about half of the page.

  • TS4079 If I have a Facebook link contact for my boyfriend how to get Siri to remember who he is

    How do I get Siri to remember to my boyfriend is a piece of Facebook link contact and it says that it does not allow her to do that

  • Multiple webdynpro applications for single webdynnpro component

    I am working on a object which have multiple webdynpro applications for single webdynnpro component.How to assign a different functionality to each application bcoz when we right click on webdynnpro component and select create webdynpro applications

  • ORA-01144: File size (4194304 blocks) exceeds maximum of 4194303 blocks

    Hello all, Wen i try to add new datafile(32GB) to tablespace i found the below error. I have space available in my disk, why i am not able to add new datafile to tablespace? ERROR at line 1: ORA-01144: File size (4194304 blocks) exceeds maximum of 41