Printing File from DMS in smartform from IW33

Hi SAP Gurus,
My requirement is as follows,
In order(IW33)>Operations>Production Resources/ Tools, A document is maintianed. I need to print file from there in a smartform regardless of the file format.
For this I have searched and found the following logic.
from Tables dms_doc2loio, dms_ph_cd1 I am getting Doc details, these details are passed to the below FM,
*This function module will give the content of the file in binary format
CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
EXPORTING
object_id = wa_object_id
client = sy-mandt
AS_IS_MODE =
RAW_MODE =
TEXT_AS_STREAM =
TABLES
FILE_ACCESS_INFO =
FILE_CONTENT_ASCII =
file_content_binary = it_file_content_binary
EXCEPTIONS
not_existing = 1
not_authorized = 2
no_content = 3
bad_storage_type = 4
OTHERS = 5.
After getting the data in binary format, how to print in smartforms, Please help..
Regards,
Pavan.

I am Sorry I dont understand why you are moving the data into a binary format conversion.
Is there any particular thing which makes you to do so? If so, Please explain.
Instead have you try to convert them into Xstring and then into String. By doing so. If any special characters or any special symbols or anything. the system wont give any error. instead it is a easy method also.
check out these function Modules: NLS_STRING_CONVERT_FROM_SYS
                                                       NLS_STRING_CONVERT_TO_SYS

Similar Messages

  • Problem viewing .xlsx and .xlsm file in DMS using Display from Archive Link

    Hello All,
    We are using IXOS as a content server for storing the documents through SAP Archive Link.
    We are not storing any documents in SAP DMS.
    The client has an requirement to manage .xlsx and .xlsm documents.
    1. xlsx - We defined a new document class xlsx under SAP NetWeaver ..-> ArchvieLink  and made the required mime and sheet settings. This allows to upload a .xlsx file to IXOS server succesfully (using Check in Archive) link.
    But whenever we try to view the file using "Display from Archive", the browser gives a warning message that the file is in different format than xls. Do you want to still open (Standard Excel application message). On clicking yes, the file opens in .xls format instead of .xlsx.
    The client doesn't want to change the format to .xls. What can be done to preserve the .xlsx files.
    2. xlsm - Any clue as to does SAP ECC 6.0 support this file type for DMS? And if how the config settings are to be done?
    I will be grateful any help.
    Thanks.
    Ketki

    Hi Ketki,
    based on your description I think that maybe SAP note 1289314 could help here and made sure that the local copy also has extension XLSX or XLSM.
    Best regards,
    Christoph

  • Material drawing from DMS to Smartform.

    Hello All,
    I need to get the material drawing which is stored in DMS to a smartform. Please suggest the procedure to get this done.
    Thanks.

    Karthik,
    Check the following link which gives some insight into how a possibe solution can be worked out.
    Dynamic graphic for SAPscript  or SMARTFORM
    However my conclusion is that there is no standard functionality which enables you to do this and there are only work arounds possible. Also you have to upload the graphics into SE78 editor each time before you display it on your form or script.
    Sojan

  • Want to open specific file from DMS Doc. thorugh Function

    HI,
    is there any function module to open specific file from DMS Document. ?
    There is already one function module DOCUMENT_SHOW_DIRECT to open File from document. But
    in case of there are more than one file in DMS Document is it giving me Popup menu to open file from List.
    I just want to open any single file without any popup from DMS Document.

    Hi,
    from standard point of view this kind of pop-up is always raised by the function module in case there are multiple originals assigned to the document info record.
    Best regards,
    Christoph

  • Print pdf/wdf files from DMS background

    Hi,
    need some guidelines for this topic. i have a requirement to print the pdf or dwf files from DMS server.
    i have write a program to download the files from DMS to local PC, and call method to print the files. However, this is only applicable to foreground.
    is there any way i can do for background?
    please advise.
    thanks in advance.

    Thanks for your reply.
    The file menu doesn't show the print option either. We used to work this way, after installing the 9.0 and Reader X version, this option has disappeared from both the File menu and the right mouse button. For other filetypes, for example Excel the Print option is still available and works properly. Logged in as administrator on the serverconsole, there is no problem. So it seams to be something specific to pdf-formats in a server 2003 environment. The userrights are all set on full control (same as administrator).
    Thanks again

  • Print from DMS directly

    hi all,
        i have a requirement that document should be printed directly from DMS. i came to kno from someone that there is s program named MCDOKPRT which can solve my problem. But i tried that program, it is giving me some text and not displaying or printing the actual document which has been loaded using the Tcode CV01n.
    Pls help
    any suggestions most welcomed.
    Regards
    Kshitij

    Hi Kshitij,
    If you want to print originals directly from a DMS transaction (CV02N or CV03N)
    it is necessary that you have defined workstation application type "3" (print) for the relevant workstation application and the frontend type in transaction DC30.
    Further it is necessary that your Windows folder options are also maintained correctly. Please see the following sample for the direct print of PDF files:
    I would recommend to do the following steps:
    1. Open Microsoft Explorer
    2. Menue: Tools   > Folder options   > File types
    3. Select "PDF" and press button "Advanced"
    4. There should be a input called "print". If there is no such entry
       please create it by pressing the button "New"
    5. Into the action field please insert "print" and to application used..
       write the Acrobat application path (see sample picture attached)
    Back to SAP system at transaction DC30:
    1. Select "PDF" and then select "define Workstation application"
    2. Edit entry: PC    PDF    3 (application type)    %Auto%
    3. Save
    After creating this settings the pdf document should be printed by
    directly. Only the empty Reader (without displaying a file) opens.
    Best regards,
    Christoph
    P.S.: Please award points of the information is useful.

  • Save/Print document from DMS with Office 365

    Dear All,
    We are on ECC 6.0 EHP 4 of SAP. When a word document attachment is opened in DMS (CV03N) from a PC having locally installed Office 365. The document is opening up in office 365 interface inside SAP. Which is good, but we are unable to save the document on to local PC. Upon clicking the File menu, i suppose word tries to bring an additional view instead of a drop down, which was the case with earlier versions. I think this is causing the problem. Can any one suggest how to save and print documents from DMS with locally installed Office 365.?
    We have figured out a work around to bring up the 'Save As' and 'Print' functionalities on to quick access tool bar. Using these shortcuts we are able to save the document but not print.
    Thank you.
    Regards,
    Kartik

    Dear Ms. Mohanapriya,
    We are quite happy with the existing DMS and our intention is not to change the existing architecture. Well, now we are able to open the document and have a workaround to save to local PC. And once the document is saved to PC users are able to print.
    Now we are looking for a solution to enable file menu of Office 365 within OLE container of SAP.
    Regards,
    Kartik

  • I have a MacBook Pro and can't print pdf files or word documents using my HP Wireless Photosmart Printer.  It will print files from the internet.  Any suggestions or ideas will be greatly appreciated.  Thank you.

    I have a MacBook Pro and can't print pdf files or word documents using my HP Wireless Photosmart Printer.  It will print files from the internet.  Any suggestions or ideas will be greatly appreciated.  Thank you.

    Hello, SoonerAnesthetist. 
    Thank you for visiting Apple Support Communities.
    Here is an article that I would recommend going through when experiencing this issue.
    OS X Mavericks: Solve printing problems
    http://support.apple.com/kb/PH14142
    Cheers,
    Jason H.

  • File download from DMS into Webdynpro for ABAP application

    I need to download the file from DMS content server on the PC and with my application on clicking of file name, file needs to be displayed.
    To achieve the downloading part I tried BAPI_DOCUMENT_CHECKOUTVIEW2, but it is not working.
    If I pass the parameters
    PF_HTTP_DEST              = 'SAPHTTPA'
    PF_FTP_DEST               = 'SAPFTPA', then it returns error message saying file can not be saved.
    If I don't pass above parameters then it gives me 'RFC_START_PROGRAM' error.
    How to download the file from DMS in WebDynpro and read/display the content?
    Please help.
    Thanks, in advance.

    Hi,
    I had the same problem, but found a solution. All I changed was the hostname to 'DEFAULT'
    Use the code below:
    DATA: lt_drao TYPE TABLE OF drao,
             wa_drao TYPE drao,
             wa_bin TYPE x LENGTH 2550,
             lt_bin LIKE TABLE OF wa_bin,
             file_data TYPE xstring,
             v_line TYPE i,
             size TYPE i.
       CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW_DIALOG'
         EXPORTING
           pf_dokar                 = ls_input-dokar
           pf_doknr                 = ls_input-doknr
           pf_dokvr                 = ls_input-dokvr
           pf_doktl                 = ls_input-doktl
    *     PF_FTP_DEST              = 'SAPFTPA'
    *     PF_HTTP_DEST             = ' '
          pf_hostname              = 'DEFAULT'
          pf_content_provide       = 'TBL'
    *     PS_API_CONTROL           =
    *   IMPORTING
    *     PSX_MESSAGE              =
    *     PSX_FILE                 =
    *     PSX_DRAW                 =
        TABLES
          ptx_content              = lt_drao.
       LOOP AT lt_drao INTO wa_drao.
         wa_bin = wa_drao-orblk.
         APPEND wa_bin TO lt_bin.
       ENDLOOP.
       DESCRIBE TABLE lt_drao LINES v_line.
       size = 2550 * v_line.
       CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
         EXPORTING
           input_length       = size
    *     FIRST_LINE         = 0
    *     LAST_LINE          = 0
        IMPORTING
          buffer             = file_data
         TABLES
           binary_tab         = lt_bin
    *   EXCEPTIONS
    *     FAILED             = 1
    *     OTHERS             = 2
       IF sy-subrc <> 0.
    * Implement suitable error handling here
       ENDIF.
    CALL METHOD cl_wd_runtime_services=>attach_file_to_response
         EXPORTING
           i_filename      = 'abc.pdf'
           i_content       = file_data
           i_mime_type     = 'application/pdf'
    *     i_in_new_window = ABAP_FALSE
    *     i_inplace       =  ABAP_FALSE

  • Printing from Adobe Reader X; file turns to "Print" file (*.prn).

    When I try to print a PDF file from Adobe Reader X, the system presents me with a "SAVE" window with the PDF file renamed as a "Print" File (*.prn).  I am unable to print this.  However, if I locate the file in a folder, and click on it, then click "Print" from the drop-down menu, the file prints correctly.
    Has anyone else had this problem, and what can be done to correct it?
    I'm using Windows XP Professional on a slightly older IBM compatable computer.

    In the print dialog disable the entry 'Print to File'.

  • Get file from dms

    hi,
    can anyone help me to get the data for a file in dms with a specific doknr? i need to get the binary data to send them per mail.
    I searched in function group cv120 (i tried cv120_read_file2table but it doesn't work for me) but wasn't able find a solution!
    can anyone help me?
    regards,
    jacko

    thanks for your example but i have to work with FUBA SO_NEW_DOCUMENT_ATT_SEND_API1 and therefore i need a solution to attach my file from dms.
    i used your solution:
    SELECT lo_objid INTO TABLE it_lo_objid
          FROM dms_doc2loio
          WHERE dokar EQ 'Z01'
          AND dokvr EQ '00'
          AND doknr LIKE srch_str.
        LOOP AT it_lo_objid INTO wa_lo_objid.
          SELECT SINGLE phio_id ph_class INTO (wa_object_id-objid ,wa_object_id-class)
            FROM dms_ph_cd1
            WHERE loio_id = wa_lo_objid.
          CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
          EXPORTING
          object_id = wa_object_id
          client = sy-mandt
    AS_IS_MODE =
    RAW_MODE =
    TEXT_AS_STREAM =
          TABLES
    FILE_ACCESS_INFO =
    FILE_CONTENT_ASCII =
          file_content_binary = it_file_content_binary
          EXCEPTIONS
          not_existing = 1
          not_authorized = 2
          no_content = 3
          bad_storage_type = 4
          OTHERS = 5.
          DATA: act_length TYPE i.
          DATA: act_diff TYPE i.
          DATA: act_rest_length TYPE i.
          DATA: act_line TYPE string.
          DATA: act_rest TYPE string.
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          DATA: count TYPE i,
                data_string TYPE xstring.
          DATA: "it_CONTENT_BINARY TYPE solix_tab,
                 it_content_binary TYPE solix_tab,
                 it_line TYPE LINE OF solix_tab,
                it_content_binary_solix TYPE solix,
                wa_content_binary TYPE solix.
    TEMP START
          DESCRIBE TABLE it_file_content_binary LINES count.
          count = count * 1022.
          CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
            EXPORTING
              input_length       = count
      FIRST_LINE         = 0
      LAST_LINE          = 0
           IMPORTING
             buffer             = data_string
            TABLES
              binary_tab         = it_file_content_binary[]
           EXCEPTIONS
             failed             = 1
             OTHERS             = 2
          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 FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer                = data_string
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
            TABLES
              binary_tab            = it_content_binary[].
    but I can't use it_content_binary[] in SO_NEW_DOCUMENT_ATT_SEND_API1 without getting an CX_SY_DYN_CALL_ILLEGAL_TYP
    it says the actual given field has the right type but not the right length! (CONTENTS_BIN)
    what's my foult!
    big thanks to you!
    greets, jacko
    Edited by: Jacko1986 on Jul 20, 2009 3:30 PM

  • Will not print files from mobile phone says it **may have** a virus- and deletes the file

    My HP photosmart premium with wireless ePrint, will not print files from mobile phone says it **may have** a virus- and deletes the file?!? My Fiance has the same phone, and I used it. It completed the file??? If I text message and E-mail address, my cell phone will come up as and E-mail address... has anyone else had this issue? Is it because I texted the the file? It didn't seem to be and issue on any of the other mobile phones used.... I am out of answers.... I tried to E-mail as well...
    Thanks in advance

    I have nearly the same problem, the printer discards my print job even when i have entered my email address as authorised senders.
    Details from my other post:
    I sent 2 emails to the printer:
    - one is a 3 lines of text and numbers in a GIF file sent as an attachment
    - another is a jpg circuit diagram paste in a word doc sent as an attachment
    both are classified as spam and refused to print. i have no email coming back saying it failed (even i have checked "Email Job Status" in ePrint Settings.
    So what will this HP printer print?
    How can I switch this useless spam filter off?
    I have get this filter off! I need this email printing to work reliably, that is a major reason I bought this printer
    Any suggestions are welcomed...
    HP's slogan on the box:
    "Now you can print from virtually anywhere" (but get discarded every single time!)

  • How to import a logo from flat file to SAP in SMARTFORM.

    how to import a logo from flat file to SAP in SMARTFORM. i need to know whether TIFF format is used and also the full steps.
    Thanks,

    Hi,
    You can not directly use a logo from a file into a Smart form. First you will have to upload it to SAP. This has to be done only once. Once it is imported into SAP then you can use it in smart form. To import a logo to SAP, goto SE78. Open the tree under GRAPHICS. Select the file type and click on the Import (first button on the toolbar, just before delete button). Select the logo file and give it some appropriate name along with description. Select appropriate type of the image and click Continue. Your logo will be uploaded into SAP from a file. Now in your smartform, Create a Graphic Node, give the name of the logo along with other properties. In this way you can import a logo from a flat file into SAP and consequently in a smart form.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • How to Import customized internal table to smartform from Print Program

    Hi Gurus,
    I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
    With regards,
    S.Saravanan

    There is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
    Regards,
    Raymond

  • Printing a Binary Print File from java

    I would like to print a binary print file directly from java. The file is normally created when you print and choose "Print to file". I have not found any way of doing this. Could anyone help me out on this one.

    Different printers use different binary formats to drive them. Different manufacturers, alas, use different codes.
    Print to file typically dumps these printer codes to a file, and it requires a driver specific to the language the printer in question uses.
    Now I'm not yet sure about how the java.awt.print stuff handles the different propriatry formats. It's clearly picking up stuff from the operating system to do the job (since it brings up system standard dialogs and options which Sun won't know about.)
    It's clearly not going to extend easilly.
    You can check out the attributes stuff in javax.print. Maybe there's one to divert print output.

Maybe you are looking for

  • Dynex 32 Led LCD tv 720p buzzing sound

    I've had this tv less then a week. When it's off It makes an annoying buzzing sound unless you cut out the power to the tv. Model number dx-32e250a1. I contacted dynex directly they told me its normal and to unplug the tv and hold the power button fo

  • How to extract the Fast Formula Body through database?

    Hi All The Oracle fast formulas are stored in the ff_formulas_f table under the column formula_text having the datatype long. I want to extract the formula text through back end. When I use the statement, Select formula_text from ff_formulas_f, I am

  • SAP XI jobs

    Hello friends,    I am little bit confused when my friends are saying 1) job market for XI is almost closed and it will remain for a couple of months 2) and may be it will lose its control over other EAI tools shortly. Is it true ,what are the job ma

  • BOL: How to read the value of an attribut

    Hiii experts, I'm new in ABAP programming. My intention is to read the value of a context attribut. This attribut ist not in form of a struct attribut. To read an struct attribut, I know to get the value, for example: value ?= me->typed_context->BP_A

  • Why is iPhoto automatically opening every time I plug in my phone?

    Every time I plug my iPhone into my Macbook it automatically opens up iPhoto whether or not I have new photos to import, which I usually don't. It's really annoying. My husband has the same phone and his doesn't do this. Is there some way to stop it?