Printing an XSTRING in ABAP

Moderator message: please do not post the same question in two forums.  Duplicate deleted
In my ABAP program I have an XSTRING that contains a PDF document.  This XSTRING was returned by a web service.  In the debugger, if I download the contents of the XSTRING and save it as a PDF I can open it and print it.  However, I need to be able to send the XSTRING to a printer in my ABAP program.  Is this possible? Do I need to convert the XSTRING to some other format first?
Thank you,
Edited by: Matt on Dec 22, 2008 7:40 AM

I was able to to solve my problem with printing ZPL code.  The fix was to use a smartform and pass the zpl code to the smart form and print it.  However, I still can't print a PDF.  I tried using the smartform in the same way as the ZPL, but it didn't work.  What format does the data have to be in when it is passed to the smartform?  Binary, PDF, OTF?
Binary Data:
255044462D312E320D0A352030206F626A0D0A3C3C0D0A2F54797065202F584F626A6563740D0A2F53756274797065202F496D6167650D0A2F4E616D65202F536E6F77626F756E64300D0A2F576964746820313730300D0A2F48656967687420323230300D0A2F42697473506572436F6D706F6E656E7420310D0A2F436F6C6............
PDF Data:
%PDF-1.2
5 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Snowbound0
/Width 1700
/Height 2200
/BitsPerComponent 1
/ColorSpace /DeviceGray
/Filter /CCITTFaxDecode
/DecodeParms <<
/K -1
/Columns 1700 /Rows 2200
/EndOfBlock false
/EndOfLine false
/EncodedByteAlign false
>>
/Length 6 0 R
>>
stream..................
Edited by: Tony Raimo on Jan 6, 2009 2:51 AM

Similar Messages

  • How to print external file using ABAP program

    Hello
    I want to print an external file which is located in server (
    20.99.0.18\GUI\xyz\8.0QUALITY\QM_TS.DOC) .....i want to print these kind of files(which i have retrieved from table 'DRAW' field 'filep' )......i need to print these files using ABAP program.
    thank you
    Vikram.
    Message was edited by:
            Vikram Bojja

    extract the data and pass to script or smartform for printing

  • How can I print PDF attachments from ABAP report in transaction ME23N?

    Hi,
    Users attach PDF files using "services for objects" in transaction ME23N.
    How can I print the PDF attachments from ABAP report ?
    Thanks in advance,,

    Hi,
      check this link,this might help you to solve your problem
    /people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
    Regards
    Kiran Sure

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

  • Inactivate the print button is the ABAP list

    How can I inactivate the print button in the report program (ABAP list)?
    I can inactive the print button on selection screen by using 'RS_SET_SELSCREEN_STATUS'. But can't achieve the same effect after the program jumped to the list output screen.
    Thanks!

    hi,
    To achieve this you need to create your own custom pf-status. The tcode for creating new pf-status is se41. Goto SE41, enter the program name and click create.
    Enter the menu bar buttons, application tool bar button and Function key as per your requirement. Active the pf-status. Once the pf-status is created, use this in your program using the statement.
    set pf-status 'ZPF'.
    Regards,
    Richa.

  • Printing a PDF from ABAP

    I have a PDF file that is returned from a web service that is Base64 encoded.  I decode the string and populate an internal table.  The internal table now contains the binary data of a PDF file.  Is there a way in abap to send this PDF file to the SAP spooler?  The requirement is to print it to an SAP printer.  I can't write it to the file system and then print it from there.  It needs to be printed from my ABAP program using the SAP Spooler.  Is this possible?  Can I use smart forms, sap script or ADS?
    Thank you
    Edited by: Tony Raimo on Jun 24, 2010 6:16 AM

    I have a PDF file that is returned from a web service that is Base64 encoded.  I decode the string and populate an internal table.  The internal table now contains the binary data of a PDF file.  Is there a way in abap to send this PDF file to the SAP spooler?  The requirement is to print it to an SAP printer.  I can't write it to the file system and then print it from there.  It needs to be printed from my ABAP program using the SAP Spooler.  Is this possible?  Can I use smart forms, sap script or ADS?
    Thank you
    Edited by: Tony Raimo on Jun 24, 2010 6:16 AM

  • How to print pallet labels in abap

    Can anyody tell me the code for printing a pallet label details from abap editor based on a handling unit and sequence count number??
    Thank you

    Hi,
    I have no idea about Pallet Labels?  What do you mean by Pallet label?
    Basically Labels are creating using
    Main window
    -->Loop node with corresponding Internal table
    >Template with required structure of Label
    Otherwise
    Loop in Print program
    -->Call Function  "Smart form Generated function module
             xxxxxx  "In this smart form create one secondary window -->Create Template and design the Label structure
             xxxxxx
    endllop.

  • Print Button in webdynpro abap?

    Hi Gurus,
                 I have created a custom button on my webdynpro screen . When I click that button I want to take print out of the particular screen and at the same time I need to hide the buttons (buttons are displaying on print screen option). Can anybody please help me out .
    Thanks & Regards
    Suman Kumar

    Hi Suman,
    To print WDA application, please refer the below document
    Printing Web Dynpro ABAP Applications - Web Dynpro for ABAP - SAP Library
    I don't think there is a standard method to hide the button from being included in snap shot of print.
    Work around solution1:
    Create a button BTN_PRINT and on click of button write the below code before call print_page( )
              i.e. hide the button,
      DATA lo_view TYPE REF TO if_wd_view.
      DATA lo_btn TYPE REF TO cl_wd_button.
      lo_view ?= wd_this->wd_get_api( ).
      lo_btn ?= lo_view->get_element( 'BTN_PRINT' ).
      lo_btn->set_visible( value = cl_wd_button=>e_visible-none ).
              " Print page
    data:
    l_api_componentcontroller type ref to if_wd_component,
    l_appl type ref to if_wd_application.
      l_api_componentcontroller = wd_comp_controller->wd_get_api( ).
    l_appl = l_api_componentcontroller->get_application( ).
    l_appl->print_page( ).
    Note: this hide the button PRINT and on subsequent action, you can make it visible again
    Work around solution2 :
    you can just create a button with access key ( CTRL + P ), without button text... So that it will not be visible in printing. Users can print by using short cut keys CTRL+P
    Hope this helps you.
    Regards,
    Rama
    Message was edited by: Ramakrishnappa Gangappa

  • Processsing non-printing ASCII characters using ABAP

    Hi All,
    I would like to process a GUI field input that contains a non-printing ASCII character. It is actually from barcode being read into a GUI field that is then picked up by an ABAP program e.g. in readable format looks like this: 123456789 but actually contains a non-printing ASCII character (ASCII char 29) used as a data separator e.g. 1234<sep>567<sep>89.
    I would like to parse the input using ABAP at the non-printing ASCII character so that I have 3 variables A=1234 & B=567 & C=89.
    How should I best tackle this?
    Cheers,
    N.

    Pls check this...
    DATA: hx29 type x value '29'.
    data : wa_hx29(1).
    data : wa_str(30) type c.
    data : wa_str1(10),wa_str2(10),wa_str3(7).
    wa_hx29 = hx29.
    split wa_str at wa_hx29 into wa_str1 wa_str2 wa_str3.

  • Print Messages in webdynpro abap

    Hi Experts,
    I have this requirement to print all the message which are displayed in the message area (top of the page). The user requires to get all messages in a file so that he wants to do the action offline.
    Please let me know if there is any way of having a print button on message are just like button "show list" and "reset log".
    Thanks & Regards,
    Tashi

    Hi,
    There is no provision to add a Toolbar button in Message Area unless you enhance the WDDOMODIFYVIEW of WDR_MESSAGE_AREA component (or do a modification) of method CREATE_ALL_MSG_TAB( ) of class CL_WDR_MESSAGE_AREA and adding a new toolbar item using  add_toolbar_item( ) method.
    Please note that the modification/ enhancement will reflect in all the WDA application not just your particular component.
    hope this helps u,
    Regards,
    Kiran

  • Printing a tree in abap report

    Hello Experts!
    I want to make an ALV tree... but only show the part of the tree (not the columns of the table
    How can i do this?
    Thanks a lot!
    Edited by: Mariano Gallicchio on Jul 3, 2009 4:21 PM

    hi,
    see sample program BCALV_TEST_HIERSEQ_LIST....
    regards,darek

  • Print html file with barcode from abap report

    hi
    i am printing html file from abap program using gui_execute.
    i am using netscape.exe , its printing first time and when reprint its not working
    basically html file contains gif file which has fedex barcode.
    could you please let me know how to print html file from report

    DGU wrote:
    where to check RAW or TEXT? the print report vi only asks for file name and printer name.
    When I print from notepad, everything just goes by default. This is a label printer, so I never need to specify printing parameter such as size, orientation, etc in the past
    Famous last words go something like this: "...never had to do that before."  Maybe you have to do that now.  It's worth at least comparing the defaults settings for bothe generic drivers.  It could save you a lot of headache if you notice something different.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Print preview in abap list format

    Dear All
    I am facing a problem with the print preview.
    When i am clicking on print preview button the system is displaying the output in a abap list format.
    but when i m taking the print it is coming correctly.
    The out put format is different in the print preview where as when i am taking the output it is coming correctly.
    Pls help me out on this.

    Please check this answered link:
    Invoice print preview defaults to ABAP List View

  • Adobe print forms - Intergration with Webdynpro ABAP

    Hi
    We are working on SAP Adobe print forms with Webdynpro ABAP. We are getting the PDF form's Hexadecimal content as a part of the FPFORMOUTPUT parameter when we execute the FM of the Form.
    I tried to assign that to a context variable and assigned that to the PDFSource of the form and tried to generate the PDF. But is is showing a black page.
    Can you please suggest a way if any to get this done.
    Regards,
    Srikanth.

    You can use the print form directly. I mean the same way as you would use the WD/ online form. Provide the form name, the data source and stuff and the form should work. If that would be an interactive one, you would not be able to change any values if the form is based on DDIC dictionary, but since you want to use the printform, this is not your concern.
    Regards Otto

  • Printing A3 page format using ABAP List from SAP is a problem...

    Hi Experts,
    I am trying to print a standard output (ABAP List) A3 page size from SAP.
    I used SWIN, SAPWIN, I9HP4 device types, but none of them worked.
    I created page format type ZYEVMIYE 290MM – 420MM and the page format L120, W200. In order to make it usable with page size is A3. Unfortunately this did not work either.
    The behaviour of the problem is when I tried to print with the device types that mentioned above then printer indicator comes to an error. And nothing comes out from the printer.
    Just to be on the safe side I made a test from windows self test, it resulted success with A3 page size format. So from this point of the view I got a thought that somehow SAP (selected device types) is not able to send correct signal to Printer for page size A3, because on the printer information screen displays ‘load Tray2 for A4’ this is showing that SAP sends Printer a signal for page format A4.
    I need help on how to make SAP (selected device type) send a correct signal to Printer in order to printout A3 page size format.
    Quick reply will much be appreciated.

    Hi,
    At last i got a Solution to my Question.
    The Problem is that in my SAP-Code they have been translated the PDF into 255 string.But i am retreiving using 132 string.So, i resolved in this way.
    <b>For Each dr As DataRow In ds.Tables(0).Rows
    Dim dataline As String = dr(0)
    If dataline.Length < 255 Then
    dataline = dataline.PadRight(255, " ")
    End If
    sb.Append(dataline)
    Next.</b>
    May be this Thread is useful to Others.
    Regards,
    Rajender.

Maybe you are looking for

  • EDI1 price is not coming from ORder ack

    Hello Team we are facing one issue in the system, where when we create PO, EDI1 and EDi2 are coming at the time of order creation ideally EDi1 , EDi2 should update at the time of order conformation, but in our system EDi1 comes from the last vendor c

  • MacBook Various Problems

    Hi, I have a Mid-2007 MacBook that is having some problems. - Cracking plastic on front palmrest - Worn trackpad - Non-functioning Optical drive It runs OSX 10.6.8 and it's on its last legs. I would like to sell it back to Apple and put that money to

  • Messages don't delete

    I use Mac Mail with Snow Leopard and I have Cox as ISP provider.  I have set Mac mail preferences in my Macmail to delete messages from server after two weeks.  This never happens.  I have to go to Webmail and delete messages page after page.  i have

  • Compile EJB files

    I download the tutorial of EJB from Sun and try to compile the source files. After I create a New Application, then I open a terminal and enter "ant converter". I got a error message. My system is Linux. ant converter Error: JAVA_HOME is not defined

  • PAM Support fpr Solaris SGD 4.3

    Hi, where can I find more informations howw to integrate PAM Support under Solaris SGD 4.3 I read in the relase notes: Support for PAM for UNIX User Authentication Secure Global Desktop now supports PAM (Pluggable Authentication Modules) for UNIX use