SBO 2005 Print document

Hi,
I've been finding information about "print documents with API's" with SBO 2005 SDK, and I found some reference to ReportLayoutService (in Documentation and in the forum),
although I`ve read some documentation about ReportLayoutService I'm still wondering how to print documents.
Can anyone help me or post some sample-code?
Thanks all

Hello,
Here a sample code for printing orders from a query (it's not perfect but it wills give you an idea how to make):
oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
            SAPbobsCOM.UserQueries oUserQueries;
            SAPbobsCOM.Documents oDocuments;
            SAPbouiCOM.ComboBox oComboBox;
            SAPbouiCOM.ComboBox oComboBox2;
            SAPbouiCOM.EditText oEditText;
            SAPbouiCOM.Form oOrderForm;
            SAPbouiCOM.EditText oEditTemp;
            SAPbouiCOM.MenuItem mItem;
            string Query;
            ChangeDeliveryCode();
            oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("PTC001").Specific;
            oComboBox2 = (SAPbouiCOM.ComboBox)oForm.Items.Item("PTC002").Specific;
            oEditText = (SAPbouiCOM.EditText)oForm.Items.Item("PTT001").Specific;
            oDocuments = (SAPbobsCOM.Documents)(vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders));
            Query = "SELECT DocEntry FROM ORDR T0 LEFT OUTER JOIN [@MTF002] T1 ON T0.CardCode = T1.U_MTF002 "; 
            Query = Query + "WHERE T0.DocStatus = 'O' AND T0.U_MTF001 = '" + oComboBox.Selected.Value + "' ";
            Query = Query + "AND T0.DocDueDate='" + oEditText.Value + "' ";
            Query = Query + "AND T0.OwnerCode='" + oComboBox2.Selected.Value + "' ";
            Query = Query + "AND T0.Printed='N' ";
            Query = Query + "ORDER BY str(T1.U_MTF004) DESC";
            try { oRecordset.DoQuery(Query); }
            catch (Exception e)
                SBO_Application.MessageBox(System.Convert.ToString(e), 1, "Ok", "", "");
                Application.Exit();
            oRecordset.MoveFirst();
            SBO_Application.ActivateMenuItem("2050");
            oOrderForm = SBO_Application.Forms.GetForm("139", 1);
            for (int i = 0; i < oRecordset.RecordCount; i++)
                oDocuments.GetByKey(System.Convert.ToInt32(oRecordset.Fields.Item(0).Value));
                oOrderForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
                oEditTemp = (SAPbouiCOM.EditText)oOrderForm.Items.Item("8").Specific;
                oEditTemp.Value = System.Convert.ToString(oDocuments.DocNum);
                oOrderForm.Items.Item("1").Click(0);
                mItem = SBO_Application.Menus.Item("520");
                mItem.Activate();
                oRecordset.MoveNext();
            oOrderForm.Close();

Similar Messages

  • Error in SBO-SD-PRT Document Printing - Documento Number

    Hello experts.
    I have a problem in :
    A/R Sales > Document Printing
    Printing invoices from here, the document number is set on the first available number in the serires.
    This happens only when printing invoices. If i print order or delivery notes, the number printed is correct.
    If i print  a single invoice from A7R invoice module, the number is correct.
    My configuration is:
    SAPB1 2007 A (8.00.181) SP:00 PL:49
    do you have any suggestion??

    HI Gordon...
    Thank's for the reply...
    In ADMINISTRATION > System Initialisation > Printing Preferences > TAB Per Document > AR Invoices
    I've this setting:
    Export  to MSWord - NO FLAG
    Print Document - NOFLAG
    Print incoming payment with invoice - NO
    Print incoming payment & invoice on One Page - NO FLAG
    Print discount data - FLAG
    Print Mfr catalogue no instead of item number - NO FLAG
    hen batch/serial no. exist print - Document and batch / serial no.
    the problem occurs after upgrade from PL42 to PL49.
    Thank's in advance

  • SBO 2005 SP1

    I have SBO 2005 A on my computer. I have just downloaded SBO 2005 SP1. What are the differences between SBO 2005 and SBO 2005 SP1?

    Well... there are many things... Here are the most important.
    Client
    - Better permormance
    - Better support of stock below zero
    - Better help docs
    - New document transfer system (Copy from/Copy To)
    - New standard Reports
    - New Backorder system
    - Greatly improved Pick And Pack system
    - Year to date features
    - Zero total invoices
    - MS SQL Server 2005 Support
    - Admin History
    SDK
    - FormDataEvent
    - FormInfo Object
    - New DI-objects
    - Current Period property
    - Delete Lines in documents
    There sould be no reason not to use the SP01 version... (For some older systems upgrading can be tricky)

  • Printing Documents

    Hi,
    Does anyone know how to print documents (a Purchase Order) via the document object ? - or if this is possible at all ??
    thanks,
    Mark

    Hi Mark,
    I am using SBO 2004 and I believe that the printing object is not exposed via the SDK. I don't know if v2005 has any printing objects exposed, but if I read correctly on this forum, it doesn't look like it. Vesion 2004 this is not possible. Are you only using the DI only or both DI and UI? If you're using UI as well and you've got the PO selected when you want to print you can simulate printing the document by activating certain menus.
    Hope it helps,
    Adele

  • Can I install SBO 2005 and 2004 in the same OS(Win XP)

    Hi, there
    Can I install SBO 2005 and 2004 in the same OS(Win XP)?
    Thanks for any help.
    Lanjun

    Hi Lanjun,
    I know you can install both of them together on one computer. I had a document specifying the steps, but cannot find it now. The problem is that you cannot create a new 2004 company or upgrade your 2004 version.
    I will look for the document and let you know.
    Adele

  • FI-CA document type when a print document is created

    Hello everybody,
    We have been searching events (e.g. 0061)/user-exit to change the FI-CA document type when a print document (based on our own logic) is created with transaction EASIBI without success. Maybe you have enhanced something in another project. Can you share you experiences?
    Thanks in advance.
    Fernando.

    We have enhanced event R999.

  • Major problem saving and printing documents on two computers

    This is a bizarre problem that seems to have been transferred from my old MDD to my new Mini when I migrated all my old data and it has me baffled. My apologies if this explanation seems long and complicated but I want to be pretty thorough.
    About a month ago I started experiencing a problem with printing. I noticed when printing a sheet of business cards that the page was getting compressed, for lack of a better word, vertically. This was very noticeable because the trim marks on the side of the page were not lining up with the perforations and each row of cards was getting progressively closer to the top as each row was printed. In other words, the first row of cards was okay but then the next row was a little too far "north", the next row a little more, the next row a little more, etc. The bottom of the page was not cut off, it was just squeezed up a bit but not enough that you could tell that the proportions were off. Now I see that many of my documents are like that no matter what application I've use to create them – Pages, Illustrator, Avery DesignPro. What's even worse, I've used Pages to create a sheet of business cards for a friend and Illustrator to make packaging labels and she's having the same problem printing the PDFs of the labels on a different computer. What this seems to tell me is that something has been corrupted and the computer is saving messed up files.
    So, about ten days ago I got a Mini and migrated my data using Migration Assistant. And the problem has now been transferred to the Mini. So I now have two Macs connected to two different HP printers that are both incapable of printing (and apparently saving) documents in the proper proportions.
    Now, a truly weird thing is that I printed a test sheet of business cards from the Mini on the printer connected to the MDD (via printer sharing) and it appeared that the document printed at the correct length. However, another document, a sheet of labels created in Illustrator, printed at the right length but one edge was slightly cropped off. Grrr.
    Anyway, as I said, until about a month ago everything worked fine so something got messed up at that time to cause this problem with saving and printing documents. I need to get this resolved for business reasons – I'm an aspiring designer – but the only thing I can think of doing is wiping out my Mini and reloading everything except my account settings from Time Machine unless someone has advice on what to do. Help! (And yes, I've checked to see that page scaling was always set at 100%.)

    Well, I've just about had it. I erased the disk, reinstalled the OS, Adobe CS4, and iWork. I did not use Migration Assistant this time to restore my settings but still my Mac prints documents in the wrong dimensions. Could this be a sudden HP problem? It seems to me some system setting somewhere is making my computer save and print documents in the wrong size. I now have a computer that is almost useless for designing. Lucky me.

  • Problem Printing Documents - No Doc Flavors Supported

    Hello everybody. I've been trying to implement a print feature in my applications and I've had absolutely zero luck. Basically, I'm trying to print the contents of an html file. However, there are no PrintServices that show up on my machine that support DocFlavors text/html, or even text/plain.
    I searched all over the Internet, but the only tutorials I found involved printing GUI components. I tried putting everything in a JEditorPane and then printing it, but the table is so large horizontally, it runs off the side, so I don't think that route will work.
    I checked IRC, scanned through all of Sun's tutorials and print service API documentation, and even searched around for open source Java word processors so I could check how their print features are implemented, but I can't find anything to help me figure this out. I know there has to be a way, though... or stuff like EIOffice and ThinkFree.com wouldn't be able to work. Can somebody please point me in the right direction?
    Here's the current code I have:
              //display print dialog
              DocFlavor df=new DocFlavor("text/html; charset="+DocFlavor.hostEncoding,"java.io.InputStream");
              PrintRequestAttributeSet attributes=new HashPrintRequestAttributeSet();
              attributes.add(new javax.print.attribute.standard.JobName("NutraSmart Menu",null));
              PrintService[] services=PrintServiceLookup.lookupPrintServices(df,attributes);
              PrintService service=null;
              if(services.length>0)
                   service=ServiceUI.printDialog(this.getGraphicsConfiguration(), this.getX()+50, this.getY()+50, services, services[0], null, attributes);
              else
                   JOptionPane.showMessageDialog(getContentPane(),"No print services could be found to print this menu.","Error printing menu",JOptionPane.ERROR_MESSAGE);
                   nutrasmart.debug(nutrasmart.ERROR,"Could not find any services to print menu");
              //print menu
              if(service!=null)
                   try
                        //create temporary HTML file to print from
                        File tmpfile=File.createTempFile("nsmenu",".html");
                        tmpfile.deleteOnExit();
                        String tmpfilestr=tmpfile.getPath();
                        export_HTML(tmpfilestr);
                        FileInputStream tmpfilestream;
                        try
                             tmpfilestream=new FileInputStream(tmpfilestr);
                        catch(FileNotFoundException e)
                             JOptionPane.showMessageDialog(getContentPane(),"A problem was encountered while preparing the menu to print.","Error printing menu",JOptionPane.ERROR_MESSAGE);
                             return;
                        //print document
                        DocPrintJob pj=service.createPrintJob();
                        Doc doc=new SimpleDoc(tmpfilestream,df,new HashDocAttributeSet());
                        pj.print(doc,attributes);
                   catch(Exception e)
                        JOptionPane.showMessageDialog(getContentPane(),"There was a problem with printing the menu.","Error printing menu",JOptionPane.ERROR_MESSAGE);
                        nutrasmart.debug(nutrasmart.ERROR,"Error printing file",e.getMessage());
              }

    Really we have a crazy font management.
    We have more than 9000 fonts in the /Library/Fonts
    To avoid conficts between the the installed system fonts and the Document font folder, we don't use the document font folder, so that we use always the /Library/Fonts/ fonts installed. Anyway some time ago we also used the Document Font folder and we got the same problem.
    I think that your idea about closing the document before the printing process has been finished is very interesting. What I do is :
    doc.print(print_preset);
    doc.close();
    But I don't how can I test if the document is being closed before finishing the printing process.
    Regards

  • How do I get my Kodak ESP 3.2s printer to print documents from my iPad ?

    I have an iPad
    I have a Kodak ESP 3.2s all in one printer
    I have set it up to print via my home wi fi using my normal laptop with Microsoft
    However I couldn't  work out how to print from my iPad as its not configured for Apple!
    I downloaded Kodak Pic flick HD app
    This means I can now print photos from my iPad!  Great
    But still can't print documents it seems     I get a message saying No AirPrint Printers Found
    Any advice very welcome
    Thank you
    iknow0

    Airprint is a technology created by Apple Inc. and introduced in iOS 4.0 that allowed iPads, iPhones, and iPod Touches to print directly to Airprint compatible printers. Unlike computer printing where the drivers, fonts, etc. are stored on the computer and sent to the printer with the document with Airprint fonts, drivers, etc. are stored on the printer and need not be sent with the document.
    The solution to your problem is 3rd party software which both Jim and I suggested to you.

  • SBO 2005 combo box does not update value at first time

    Hi!I developed an addon for sbo 2004 with a combo box populated with the months of the year, and it works. The same code run on SBO 2005 works only after the second selection. Has anyone found the same problem?

    definition of the item:
    item = form.Items.Add("oMese", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
                    item.Left = 245
                    item.Top = 5
                    item.Width = 80
                    item.DisplayDesc = True
                    combo = item.Specific
                    combo.DataBind.SetBound(True, "", "uMese")
                    combo.ValidValues.Add(1, "Gennaio")
                    combo.ValidValues.Add(2, "Febbraio")
    event handling:
    inside ItemEvent in case the item is selected
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
                        Select Case pVal.FormUID
                            Case "PRG_UFM_0002_RegIVAAcq"
                                retCode = oTy_RACQ.FormComboSelect(pVal, BubbleEvent)
      Public Shared Function FormComboSelect(ByVal pVal As SAPbouiCOM.ItemEvent, _
                                               ByRef BubbleEvent As Boolean, _
                                               ByRef funCaller As Object, _
                                               ByVal funCallerID As Integer, _
                                               ByRef aForm As SAPbouiCOM.Form) _
                                               As Integer
            Dim msg As String
            Dim edt As SAPbouiCOM.EditText
            Dim cmb As SAPbouiCOM.ComboBox
            Dim obt As SAPbouiCOM.OptionBtn
            Dim cbx As SAPbouiCOM.CheckBox
            Dim mtx As SAPbouiCOM.Matrix
            Try
                If pVal.Before_Action = True Then
                    Select Case pVal.ItemUID
                        Case "oMese"
                            Dim stre As New strEstremi
                            cmb = aForm.Items.Item("oMese").Specific
                            edt = aForm.Items.Item("anno").Specific
                            If Not cmb.Selected Is Nothing Then
                                GetEstremiPeriod(edt.Value, cmb.Selected.Value, "M", stre)
                                edt = aForm.Items.Item("dtFrom").Specific
                                edt.String = stre.dtFrom
                                edt = aForm.Items.Item("dtTo").Specific
                                edt.String = stre.dtTo
                            End If
    end function
    thank you I hope is enough otherwise please tell me

  • How can i use only black cartridge for printing documents

    i have today installed hp 1510 all in one printer, it uses ink from the both cartridges i just want to use black ink for printing documents, how can i do that
    This question was solved.
    View Solution.

    Hi @sandeepv 
    I can help you with your print settings, so the printer will print black and white only.
    If you have a Mac operating system, use the instructions below.
    Printing with the Black Print Cartridge Only option
    Click File and then click Print.
    Make sure your printer is selected.
    Verify that the Preset option is set to Standard.
    In the Copies & Pages menu, select Select Paper Type / Quality.
    NOTE:If this option is not available, click ColorSync. Then click the down arrow beside Quartz Filter and change the setting from None to Black & White.
    Select the Paper tab.
    From the Color option menu, select Grayscale.
    Select the Color Options tab.
    Select the Black Print Cartridge Only option.
    If that option is not listed, then it is not available. The printer will print using only the black cartridge, however, printing with one cartridge will be slower than printing with both cartridges.
    NOTE:To save the setting, click the arrow next to Preset and select Save As. Save the Preset option as Black Cartridge Only and then click OK. Then, the next time you want to print with just the black cartridge, select the Black Cartridge Only Preset.    -Source
    If you are using a Windows operating system, use the instructions in the following link. Although this document is titled Changing Print Settings in Windows 8 it can be used for other Windows operating systems. The navigation from Windows 8 to older Windows operating systems would vary, please let me know if you are using a different operating system and/or if you require additional assistance.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • I have an 10x14" InDesign image that I'd like to shrink to fit within a 8.5x11 printed document.

    I have an 10"x14" InDesign image that I'd like to shrink to fit within a 8.5"x11" printed document (using InDesign) without losing the quality of the image (especially on print). What is the correct/least destructive process to do this?
    And how is it that you can view different image sizes on Flickr (of the same image) and it doesn't seem to effect the quality of the image?
    I have tried saving/exporting the InDesign image as an EPS file, then opening the file in Photoshop, adjusting the size to my liking, saving it as a Photoshop file, then placing that file in a new InDesign document, and the image comes up distorted looking/pixelated even with my screen zoomed at 100%. I've also tried this same process with exporting it as a PDF file instead of an EPS file with the same distorted/pixelated results.
    Help!?!?!  Thank you in advance!!
    Linds10m

    I am assuming you are in InDesign CS5:
    Change your InDesign Document Size, but before you do this you must make sure the "Enable Layout Adustment" is on.
    Under: Layout/Layout Adjustment/Check the "Enable Layout Adjustment" box is checked and adjust Snap Zone.
    ALSO: Make sure your horizontal and vertical margins touches your live area.
    Then you can change size of document

  • My HP officejet 6210 no longer prints documents from my Mac ibook G4 running 10.4.11; starts to process the document, but then stops the print,if I restart print same thing happens

    My ibookG4, running 10.4.11 suddenly decided it no longer wants to print documents thru my HP officejet 6210 all-in-one printer.  So far I've tried emails, excel and word all with the same result.  The computer will start to process the print request (processing seems to take longer than previously) and then suddenly the processing stops and a red exclamation mark appears next to the printer image at the bottom of screen.  When I pull up the printer utility it tells me the printer is "stopped".  If I restart it, the process begins all over again until once again it stops.  I have already deleted the printer completely from my computer and reinstalled the software fom the HP site.  For some reason had a really tough time finding the correct print drivers on the HP site, but did finally locate them.  I have not even attempted scanning during this (I see lots of people reported issues with that for the 6210), I would be happy if I could at least print again.  I am connecting via USB.  Is there some way to fix this?

    Hi Evelyn,
    Mac OS X: About the Reset Printing System feature ...
    http://support.apple.com/kb/HT1341?viewlocale=en_US

  • How to create print document for payment to customer through cash journal

    Dear Sirs,
    I have a problem with print document from cash journal. I enter a payment to customer (when I turn the money to customer) and the system makes right posting, but when I try to print this point, system printing document for incom from customer. I'm using business transaction for customer posting in cash journal. I would like to know how I have to manage this posting - payment to customer, or incoming from vendor (returnes advances from emploee)?

    Hi,
    please check whether the two solutions below work:
    1. create a contract with milestone billing plan where there are only down payment billings, so that on the basis of the contract you can generate down payment requests and then relevant down payments, release the contract to a sales order which can then be delivered and billed, manually clear the billing document with the down payments
    2. from FI module, create down payment requests via t-code F-37 directly, and then down payment posting, generate sales order directly, and then deliver and bill, manually clear the billing document with the down payments

  • Missing pages in printed document

    Some topics are missing in the printed document. What could be the reason for this? I have tried and tried but could not get those pages printed.

    Welcome to the RH forums.
    Perhaps you could give us some additional information which would help us here. What version of RH are you using? Is the problem only in one project or on one PC? Is it the same pages that are always missing? Are they always missing from the start, middle, end? That sort of thing.
    For a start, check that you have included all the required pages correctly. Check out this link.  Also check to see if you have any Conditional Build Tags that could be filtering out the topics you are expecting to see.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

Maybe you are looking for

  • Quota Generation using RPTQTA00

    Hello All, I am trying to generate Quota for an employee after performing leaving action using RPTQTA00. Example :-  employee leaving action from 01.10.2010, i am trying to generated quota for period 01.01.2010 to 30.09.2010 but the program does not

  • Cube to Cube Poor Performance

    Our situation is that we have our current situation - a long running weekly process -  and a project that is in progress.  We are experiencing a long running load from 1 cue to another.  I am looking for suggestions on decreasing this run time.  Here

  • Virtual PC v7.0.2 and macbook pro with intel cpu

    Is Microsoft Virtual PC v7.0.2 compatibble with intel cpu's? thanks

  • ITunes bug with non-latin characters in the path

    I've just bought a Beyoncé video clip from iTunes Store. iTunes unable to play (even transfer to iPod) this video because folder's name contains french "é" symbol. When I've renamed folder to "Beyonce" then iTunes played video successfully. BTW, my s

  • How Can I do to add new dateu00B4s field in VBEP table ?

    How can I do to show these fields on the screen of the schedule lines ? What exactly do I need to do ?