Problem creating an outgoing payment with DI API

Hi
I've created a form that allows a user to select a BP and automatically reconcile the accounts for this BP by creating an Outgoing Payment. It all works fine for Invoices, Credits, Purchase Invoices etc., however if the account balance contains Incoming or outgoing payments I am not sure how to treat these as there is not an invoice type (SAPbobsCOM.BoRcptInvTypes) for these. For the other types of document I simply declare what type of invoice the document to be added to the outgoing payment is by looking at the Transtype field of the record from the JDT1 table. I then use the JDT1.BaseRef field to retrieve the document's DocNum which I use to return the DocEntry by looking in the relevant table e.g. for invoices - OINV. All I then need to do is set the OutgoingPayments.Invoices.DocEntry value to this DocEntry and Add the line.
I also have the same problem with Opening Balances as I can't seem to figure out what to set the DocEntry value to as this seems to be stored as a Journal Entry which uses the TransId for it's primary key, however this does not seem to work.
Thanks a lot.
Steve

Hello Steven,
You can use createdby field to determine the docentry of the base document instead of quering docentry by docnum
select createdby, transtype, baseref from jdt1
Note: Always set the correct document type for payments: (createdby is ok in integer format)
Example:
Opening Balance:  JE # 8 amount 1000, created by Opening balance (not JE)
   vPay.Invoices.DocEntry = 8
   vPay.Invoices.InvoiceType = BoRcptInvTypes.it_OpeningBalance
   vPay.Invoices.SumApplied = 1000
   Call vPay.Invoices.Add
Opening Balance:  JE # 8 amount 1000, created by Journal Entry
   vPay.Invoices.DocEntry = 8
   vPay.Invoices.InvoiceType = BoRcptInvTypes.it_JournalEntry
   vPay.Invoices.SumApplied = 1000
   Call vPay.Invoices.Add
Sales Invoice:  DocEntry: 11  amount 1000
   vPay.Invoices.DocEntry = 11
   vPay.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
   vPay.Invoices.SumApplied = 1000
   Call vPay.Invoices.Add
Regards,
J.

Similar Messages

  • FB01 - Create an outgoing payment with a Bapi

    Hi there, I'm trying to simulate outgoing payments with BAPI_ACC_GL_POSTING_POST but I'm finding problems, does someone knows if this is the right bapi ??
    I'm finding problems 'cause the bapi needs a gl account but I have to put the vendor code and I don't know if I'm doing right, I'm putting the code for the items (25 and 50) in the accountgl-doc_type field.

    You don't need to put posting key ( In fact with the Doc Type and the amount sign +/-, the Bapi deduce posting keys )
    For the header you need :
    [code]
      documentheader-obj_type = 'BKPFF'.
      documentheader-obj_key = '$'. " If external Num.
      CONCATENATE sy-sysid 'CLNT' sy-mandt INTO documentheader-obj_sys.
      documentheader-username   = sy-uname.
      documentheader-bus_act    = 'RFBU'.
      documentheader-header_txt = s_notilus-header_txt.
      documentheader-comp_code  = s_notilus-comp_code.
      documentheader-fisc_year  = sy-datum(4).
      documentheader-doc_date   = s_notilus-doc_date.
      documentheader-pstng_date = sy-datum.
      documentheader-doc_type   = s_notilus-doc_type.
      documentheader-ref_doc_no = s_notilus-ref_doc_no.
    [/code]
    Hope it helps
    erwan

  • Outgoing payment with Zero amount when Full adance is paid

    I am making A/P down payment request based on purchase order, then I make full payment of PO (full advance payment - no amount of payment left with) through "Outgoing payment" which creates negative amount in Business partner balance and shows a negative entry in "outgoing payment" screen. Moving further, I make Goods receipt PO and then I make A/P invoice of regular amount based on goods receipt PO / Purchase order.
    Up till now, the full payment has been made in advance through A/P down payment request and upon receiving goods the A/P invoice of regular amount is received. Now when I go to "outgoing payments" I have no amount left to pay (i.e. It displays 2 entries of same amount, one with positive amount of A/P invoice and the other one with negative amount of A/P down payment request to show the due balance = zero)  So I am trying to clear the vendor "outgoing payments" by paying with Zero amount, but the system shows the error "The confirmation amount should be greater than Zero".
    How can I clear the vendor "Outgoing payments" with zero amount ?? as it's payment has been made in advance.
    Note: Please give me the solution by keeping in mind that I have to pay full amount in advance.
    Solution to this problem would be highly appreciated.
    Thanks and regards,
    Farhan Sufi

    Hi Farhan Sufi,
                  For Cases where full Advance is paid initially, You Follow these procedure, I have tested in my DB its working fine.
    Step 1: Raise a Purchase order Say Rs 1000/-
    Step 2: Raise a GR(PO) of Rs 1000/-
    Step 3: Go To A/P Down Pmt -
    Select the Vendor -
    Say copy from GR(PO), And select te One you wanted. At the bottom in the DPM Field give 100% and Add the Document.
    Step 4: Raise Out Going Payment by linking to the A/P Down Pmt what you have posted. ie., Go To Out Going Pmt Screen---Select the Vendor, This will display all invoices, Down pmts, Credit Memos, and JE's. Select the A/P Down Pmt what you have posted and go to payment means fill in the respective field and add the document.
    Step 5: Go To A/P Invoice Screen, select the vendor. And  click on Copy from GR(PO), Select the respective GR(PO) document.
    And At the Bottom double click on Total Down Payment Button, This will display the list of all Down Payments for which Out going payments are also posted. Here Select the respective Down payment and add the document.
    When you add this A/P Invoice document gets added and the status of the document will be closed. As you have made full payment in the A/P Down Payment Screen.
    And This Invoice will not appear in the Out Going Screen as the document is closed.
    Cheers,
    Sree.

  • I encountered an error in the Payment Wizard screen as I was creating an Outgoing Payment for petty cash expenses. On the "Recommendation Report" screen, I clicked "Non-Included Trans." and saw that one of the vendors (Vendor Code: WILCO) has the followi

    Hello,
    I encountered an error in the Payment Wizard screen as I was creating an Outgoing Payment for petty cash expenses. On the “Recommendation Report” screen, I clicked “Non-Included Trans.” and saw that one of the vendors (Vendor Code: WILCO) has the following error:
    “The document amount is greater than the max. amount allowed in the payment methods linked to the BP”
    Upon checking, the “PCF-W” Payment Method linked to WILCO does not have any restrictions, nor does WILCO have any credit/commitment limit set. I have also appropriately defined the Dummy Business Partner Bank (under Payment Terms) as well as checked the “Included” box for PCF-W on the Payment Run-Payment Methods screen.
    Could anyone please help me on this?
    Salamat,
    Cat

    PS - have found other posts indicating that clips smaller than 2s or sometimes 5s, or "short files" can cause this. Modern style editing often uses short takes ! Good grief I cannot believe Apple. Well I deleted a half a dozen short sections and can export, but now of course the video is a ruined piiece of junk and I need to re-do the whole thing, the sound etc. which is basically taking as much time as the original. And each time I re-do it I risk again this lovely error -50 and again trying to figure out what thing bugs it via trial and error instead of a REASONABLE ERROR MESSAGE POINTING TO THE CLIP IT CAN'T PROCESS. What a mess. I HATE this iMovie application - full of BUGS BUGS BUGS which Apple will not fix obviously, since I had this product for a few years and see just hundreds of hits on Google about this error with disappointed users. Such junk I cannot believe I paid money for it and Apple does not support it with fixes !!!
    If anyone knows of a GOOD reasonably priced video editing program NOT from APPLE I am still looking for suggestions. I want to do more video in future, but obviously NOT with iMovie !!!

  • A/R Invoice - Create two outgoing payments

    Hi,
    We have issue here regading A/R Invoice Payment.
    The A/R Invoice is $100, the payment is $200 with Interact card (Direct account payment) with $100 cash return.
    The present does not work in B1; but will be developed in future release.
    The present can be solved according to Peter Dominik, B1 Solution Management as follow:
    Create two outgoing payments:
    - payment to vendor (payment for his bill)
    - payment on account reposting balance from Bank Account to some
    PettyCash account (cash
    withdrawal from bank account)
    Now I need to source code for the present solution; because all SDK is 1 A/R Invoice and 1 Payment. Now we have to do 2 outgoing payments. We need your help for this solution.
    Please find the code for one transaction below; we need 2 payment transactions.
    Thank you,
    Rune
    oPayments = (SAPbobsCOM.Payments)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments);
    oPayments.Invoices.DiscountPercent = 0;
    oPayments.Invoices.DocEntry = vmp_DocEntry_Int32;
    oPayments.Invoices.DocLine = 0;
    oPayments.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_Invoice;//13;
    oPayments.Invoices.SumApplied = vmp_Amount_double;
    oPayments.Invoices.Add();
    oPayments.CardCode = vmp_CardCode_string;
    oPayments.DocDate = DateTime.Now;
    oPayments.JournalRemarks = "Incoming - Payment Bank Transfer";
    oPayments.TaxDate = DateTime.Now;
    oPayments.TransferAccount = vmp_BankAccount_string;// "_SYS00000000343";
    oPayments.TransferDate = DateTime.Now;
    oPayments.TransferReference = vmp_CardCode_string;
    oPayments.TransferSum = vmp_Amount_double;
    vc_Message_Result_Int32 = oPayments.Add();
    if (vc_Message_Result_Int32 != 0)

    hi Vitor,
    I need a code sample for Peter's suggestion using the code I provided:
    Create two outgoing payments:
    - payment to vendor (payment for his bill)
    - payment on account reposting balance from Bank Account to some
    PettyCash account (cash
    withdrawal from bank account)
    Thank you,
    Rune

  • How can I create a reserve invoice with DI API?

    HI,
    I need to create a reserve invoice with DI API, how do I this?.  I have SAP B1 2005A.
    Sorry for my english.
    Thank's.

    Hi César,
    Unfortunately, I think the reserve invoice is only available in the DI API in version 2007A.
    Kind Regards,
    Owen

  • Outgoing payment with Payment Wizard with Bank Transfer

    Hello to everyone !!!
    I'm Configuring a Company who want to use the 'Payment Wizard' to make Outgoing Bank Transfers payments with it.
    I did the configuration in 'Payment Methods' of Outgoing Bank Transfers, where I chose a File Format from the list (Even I don't know which one should I choose) and I also chose de 'House bank', bank and account where the Outgoing Bank Transfers will come.
    At the time when I did the payment wizard it suggest me to make an outgoing payment of my due A/P invoice very well. The problem is in the next step (STEP 7) when i run the execution and in STEP 8 it says:
    0 Payments were added
    0 Bank transfers were added
    So, It did not make any bank transfer Transaction!!!! =S
    Someone knows what i'm missing from the configuration???
    Someone knows if this is a bug??
    Thanks for your Help!!!!

    Hi Karina,
    please see the info from SAP Note 725786. The note is currently being updated with the new information relating to system behaviour in version 2007  & should be released again shortly:
    In order for the payment wizard and subsequently the payment engine to
    work properly, SAP Business One must be defined correctly as follows:
    1. Define the House Bank:
    a) Administration -> Setup -> Banking -> House Bank Accounts - Setup.
    b) Choose the Bank Code, Country and Account Number.
    c) If the business partner bank is a postoffice bank, tick the Post Office box.
    d) Update the window.
    e) Enter into the House Bank Account Setup winod again and enter the Branch and the account number of the corresponding G/L Account.
    f) Update the window.
    2. Define Business Partner bank:
    a) Administration -> Setup -> Banking -> Banks.
    b) Choose the Country Code, Bank Code and Bank Name, if necessary Swift number.
    c) If the business partner bank is a postoffice bank, tick the Post Office box.
    d) Update the window.
    3. Define Payment Methods:
    a) Administration -> Setup -> Banking -> Payment Methods.
    b) Enter the Payment Method Code, Description and the Transaction Type.
    c) Select the Payment Type and the Payment Means.
    d) In "File Format" choose the correct plug-in for the transaction (refer to the Payment Engine Online Help for the correct plug-in for the transaction you have defined).
    e) Select your House Bank for this particular payment method.
    f) Select the validation options and remember to tick Post Office Bank, if the bank is a Post Office Bank.
    g) If the outgoing payment is by cheque, restrictions can also be defined here.
    h) Add or update the window.
    4. Set up a Business Partner for the payment wizard:
    a) Business Partner -> Business Partner Master Data.
    b) Under the "Payment Terms" tab, enter the bank country.
    c) Enter the account number and the branch, update to return to Business Partner Master Data.
    d) Under the Tab "Payment system" tab, tick the desired Payment Method to include it in a payment run.
    e) Under the Tab "Payment system", select the house bank that was defined for the desired payment method used for transactions with this business partner.
    f) Update the window.
    5. Generate invoices for this business partner.
    6. Define the standards for the payment run:
    a) Banking -> Payment System -> Define Payment Run Defaults (In 2007 A version the path is: Administration -> Setup -> Banking -> Payment Run Defaults).
    b) Define tolerance days, cash discounts etc as needed.
    c) Define minimum and  maximum payments if necessary.
    d) Tick the box beside "Payment Methods".
    e) Click on the radiobutton beside "Payment Methods" and select the payment method(s) to be executed in this payment run by putting a tick in the tick box.
    f) Update the window.
    7. Open the Payment Wizard (Banking -> Payment System -> Payment Wizard).
    a) Select a new payment run - Step 1.
    b) Click on "Next" and define the Payment Run Name and the Posting Date, the payment type and the payment means - Step 2.
    c) Click on "Next" and select the business partners to be included in this payment run, make sure that the tick box for the relevant Business Partner Name is ticked - Step 3.
    d) Click on "Next" and define the document parameters - Step 4.
    e) Click on "Next" and select the payment method this payment run is applied to by ticking the box to the left of the payment method code - Step 5.
    f) Click on "Next" and tick the payment number for the business partner to be included, individual invoices can be selected by clicking on the "Expand All" button and either selected or deselected. This also applies to Credit Memos (and to manual Journal ENtries in 2007 A). Click on "Non-included Trans." to identify any troublesome transactions - Step 6.
    g) Select to either "Save the selection criteria", or "Mark as recommended" to process at a later point in time or select to "Execute" immediately - Step 7.
    h) In Step 8, you are given the Payments Run Summary.
    i) If you selected to execute the payment run, in Step 9 the Document and Report Printing options will be displayed. To generate the bankfile and any associated documents relevant to your localisation, click on the radiobutton "Bankfile".
    j) A "Browse for Folder" window will pop up where the destination directory of the output files must be selected. Once a folder was selected and "OK" was clicked, the payment engine will take the data out of Business One and create the defined files.
    k) Once the procedure has completed, an information system message will be displayed: Payment Engine run was successful"
    8. Go to the destination folder and check the logfile and the bank file(s).
    All the best,
    kerstin

  • Invalid Account Code when Adding Outgoing payments  with WTholding Tax

    Hello Experts
    I am facing problem when trying to add an outgoing payment (DI) with WTHolding Tax and below is the error message;
    Invalid Account CodeMessage 173-9
    I have checked the WThodling Tax Account in WThodling Tax Setup.
    I am Using SAP 8.8 PL 19
    Please Help Me
    Dixit Patel
    Edited by: Dixit Patel on Mar 25, 2011 1:37 PM

    Hi
    Please Check all G/L Account Determination TAB.  Check all accounts are determined.
    Check this Thread It may help you.
    [Invalid Account Code error when posting AP Credit Note]
    Thanks
    Balaji Sampath

  • Problem while rendering report generated with iText API

    Hi!
    I am stuck with problem of rendering report generated through iText API.
    What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
    But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
    The code is as follows, which I have used to render
    public class HTMLPrintRenderer implements Printable {
        ReportAbs objReport;
        JEditorPane editorPane;
        String fileName;
        final int STARTING_PAGESET_NUMBER=0;
        int currentPageSetNumber=STARTING_PAGESET_NUMBER;
        /** Creates a new instance of HTMLPrintRenderer */
        public HTMLPrintRenderer(ReportAbs  objReport) throws Exception{
            this.objReport=objReport;
            this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
            if(objReport.isLayoutLandscape()){
                SCALE =600.0/1000;//600.0/850;
            else{
                SCALE =600.0/850;
            init();
        private void init()throws Exception{
            setDocument(STARTING_PAGESET_NUMBER);
        public void setDocument(int pageSetNumber) throws Exception{
            editorPane=new JEditorPane();
            ((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
            editorPane.setText("text/html");
            editorPane.setPage("file:"+fileName+"."+pageSetNumber);
            currentPageSetNumber=pageSetNumber;
        int pageCountInPageSet=0;// counter to track number of pages in each pageSet
        int currentPage=-1;
        double pageStartY=0,pageEndY=0;
        final double SCALE;// =600.0/1000;//600.0/850;
        final int HEADER_HEIGHT=30;//50;
        final int FOOTER_HEIGHT=70;
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
            Graphics2D graphics2D;
            graphics2D = (Graphics2D) graphics;
            initEditorPane(editorPane,pageFormat);
            ReportPrinterUtility.printPageAttributes(pageFormat);
            /// print custom here... page numbers and page headers may be printed here
            /// meant only for HEADRS and FOOTERS
            ///                 caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
            /// @author Manoj       
            //TRANSLATE..............must also be reverse translated
            double x=pageFormat.getImageableX();
            double y=pageFormat.getImageableY();
            graphics2D.translate(x,y);
            paintCustomPage(graphics2D,pageFormat);
            //REVERSETRANSLATE
            graphics2D.translate(-x,-y);
            graphics2D.scale(SCALE,SCALE);
            //  V set clipping area
            int headerHeight=HEADER_HEIGHT;
                graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
                (int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
                (int) (pageFormat.getImageableWidth()/SCALE),
                (int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
            //  VI set pageStart on editorPane
            if (pageIndex > currentPage) {
                currentPage = pageIndex;
                pageStartY += pageEndY;
                pageEndY = graphics2D.getClipBounds().getHeight();
                pageCountInPageSet++;
            //  VII
            graphics2D.translate(graphics2D.getClipBounds().getX(),
            graphics2D.getClipBounds().getY());
            //  VIII prepare clipping area
            Rectangle allocation = new Rectangle(0,
            (int) -pageStartY,
            (int) (editorPane.getMinimumSize().getWidth()),
            (int) (editorPane.getPreferredSize().getHeight()));
            View rootView=editorPane.getUI().getRootView(editorPane);
            if (printView(graphics2D,allocation,rootView)) {//page exists          
                System.out.println("page exists"+pageCountInPageSet);
                return Printable.PAGE_EXISTS;
            else {// page does not exist
                System.out.println("resetting page parameters");
                pageStartY = 0;
                pageEndY = 0;
                currentPage = -1;
                if(!setupNextPage()){///more pages exist TODO:
                    return Printable.NO_SUCH_PAGE;
                else{//no more pages exist
                    //                call next page
                    pageCountInPageSet=0;//reset to first page in pageSet
                    resetGraphics(graphics2D,pageFormat);
                    return print(graphics2D,pageFormat,pageIndex);
    private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
            graphics2D.clearRect(0,0,
            (int)(pFormat.getImageableWidth()/SCALE),
            (int)(pFormat.getImageableHeight()/SCALE));
            graphics2D.translate(-graphics2D.getClipBounds().getX(),
            -graphics2D.getClipBounds().getY());
            graphics2D.scale(1/SCALE, 1/SCALE);
        }

    Hi!
    I am stuck with problem of rendering report generated through iText API.
    What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
    But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
    The code is as follows, which I have used to render
    public class HTMLPrintRenderer implements Printable {
        ReportAbs objReport;
        JEditorPane editorPane;
        String fileName;
        final int STARTING_PAGESET_NUMBER=0;
        int currentPageSetNumber=STARTING_PAGESET_NUMBER;
        /** Creates a new instance of HTMLPrintRenderer */
        public HTMLPrintRenderer(ReportAbs  objReport) throws Exception{
            this.objReport=objReport;
            this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
            if(objReport.isLayoutLandscape()){
                SCALE =600.0/1000;//600.0/850;
            else{
                SCALE =600.0/850;
            init();
        private void init()throws Exception{
            setDocument(STARTING_PAGESET_NUMBER);
        public void setDocument(int pageSetNumber) throws Exception{
            editorPane=new JEditorPane();
            ((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
            editorPane.setText("text/html");
            editorPane.setPage("file:"+fileName+"."+pageSetNumber);
            currentPageSetNumber=pageSetNumber;
        int pageCountInPageSet=0;// counter to track number of pages in each pageSet
        int currentPage=-1;
        double pageStartY=0,pageEndY=0;
        final double SCALE;// =600.0/1000;//600.0/850;
        final int HEADER_HEIGHT=30;//50;
        final int FOOTER_HEIGHT=70;
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
            Graphics2D graphics2D;
            graphics2D = (Graphics2D) graphics;
            initEditorPane(editorPane,pageFormat);
            ReportPrinterUtility.printPageAttributes(pageFormat);
            /// print custom here... page numbers and page headers may be printed here
            /// meant only for HEADRS and FOOTERS
            ///                 caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
            /// @author Manoj       
            //TRANSLATE..............must also be reverse translated
            double x=pageFormat.getImageableX();
            double y=pageFormat.getImageableY();
            graphics2D.translate(x,y);
            paintCustomPage(graphics2D,pageFormat);
            //REVERSETRANSLATE
            graphics2D.translate(-x,-y);
            graphics2D.scale(SCALE,SCALE);
            //  V set clipping area
            int headerHeight=HEADER_HEIGHT;
                graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
                (int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
                (int) (pageFormat.getImageableWidth()/SCALE),
                (int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
            //  VI set pageStart on editorPane
            if (pageIndex > currentPage) {
                currentPage = pageIndex;
                pageStartY += pageEndY;
                pageEndY = graphics2D.getClipBounds().getHeight();
                pageCountInPageSet++;
            //  VII
            graphics2D.translate(graphics2D.getClipBounds().getX(),
            graphics2D.getClipBounds().getY());
            //  VIII prepare clipping area
            Rectangle allocation = new Rectangle(0,
            (int) -pageStartY,
            (int) (editorPane.getMinimumSize().getWidth()),
            (int) (editorPane.getPreferredSize().getHeight()));
            View rootView=editorPane.getUI().getRootView(editorPane);
            if (printView(graphics2D,allocation,rootView)) {//page exists          
                System.out.println("page exists"+pageCountInPageSet);
                return Printable.PAGE_EXISTS;
            else {// page does not exist
                System.out.println("resetting page parameters");
                pageStartY = 0;
                pageEndY = 0;
                currentPage = -1;
                if(!setupNextPage()){///more pages exist TODO:
                    return Printable.NO_SUCH_PAGE;
                else{//no more pages exist
                    //                call next page
                    pageCountInPageSet=0;//reset to first page in pageSet
                    resetGraphics(graphics2D,pageFormat);
                    return print(graphics2D,pageFormat,pageIndex);
    private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
            graphics2D.clearRect(0,0,
            (int)(pFormat.getImageableWidth()/SCALE),
            (int)(pFormat.getImageableHeight()/SCALE));
            graphics2D.translate(-graphics2D.getClipBounds().getX(),
            -graphics2D.getClipBounds().getY());
            graphics2D.scale(1/SCALE, 1/SCALE);
        }

  • Problem creating an sql query with a parameter which is a list

    Hi,
    Im having a problem creating a certain SQL query.
    The query looks like this:
    SELECT gstock_id FROM germplasm_stock gps, germplasm gp WHERE gps.germplasm_id = gp.germplasm_id AND organism_id IN ($childList:VARCHAR).
    the organism_id field is of DECIMAL type.
    the parameter childList is actually a list of Id's, something like: 123,124,789
    and it is created dynamically by an other function, so I cant just put it there staticlly.
    I tried using the ARRAY type instead of VARCHAR, but that didn't work,
    anyone knows how can I give this query a parameter which is a list of numbers ?
    Thanks

    I have tried all the following options and the same issue occurs:
    EXEC dbo.uspGetSiteChanges @ChangeVersion = ?
    With Parameter: 0, @ChangeVersion, ChangeVersion
    EXEC dbo.uspGetSiteChanges ?
    With Parameter: 0, @ChangeVersion, ChangeVersion
    In my first data flow I use the following and it works on two OLE DB Sources:
    EXEC dbo.uspGetSiteChanges @ChangeVersion = ?
    With:
    In my second data flow task, I use the same command and parameter mappings and it fails, very strange.

  • Problem creating an OData service with RFC-/BOR Import.

    Hi Experts,
    i am running always into the same problem
    I want to create an Odata Channel with "SEGW" and Datamodel with an RFC import.
    RFC si GET_CPU_ALL
    but I am running always into the same problem when I want to generate the runtime.
    I don´t know why.
    Error: ... _DPC was generated with syntax errors....
    I would really appreciate if someone could help me.
    Thanks

    Oh dear, your'e not an ABAP guy are you
    OK, you can go back to my previous suggestion and do it a different way, but first...
    TF_CPU_ALL isn't a table, it's a structure of type CPU_ALL. GET_CPU_ALL uses that as the interface structure for data it sends out.
    Starting with a blank service, create a model by using DDIC import wizard, using CPU_ALL as the structure. Call the entity "CPU". Mark 'serialnr' as the key.Create an entityset called "CPUSet".
    Generate the service.
    Go to DPC_EXT, find method CPUSET_GET_ENTITYSET and redefine it. Assuming that you can leave the inputs as the defaults, call function GET_CPU_ALL in the method with the importing parameter TF_CPU_ALL assigned to ET_ENTITYSET.
    call function 'GET_CPU_ALL'
         tables
           tf_cpu_all = et_entityset
         exceptions
           others     = 1.
       if sy-subrc <> 0.
    * Implement suitable error handling here
       endif.
    That's all it needs.
    Activate EXT class and try your service.
    opu/odata/sap/ZCPUALL_SRV/CPUSet?$format=json
    "type" : "ZCPUALL_SRV.CPU"
             "Type" : 101,
             "Subtype" : 3,
             "Serialnr" : 0,
             "NbrCpu" : 2,
             "Load1Avg" : 7,
             "Load5Avg" : 29,
             "Load15Avg" : 30,
             "IntSec" : 1059,
             "SyscSec" : 4555,
             "CsSec" : 895,
             "UsrTotal" : 3,
             "SysTotal" : 1,
             "IdleTotal" : 96,
             "IdleTrue" : 96,
             "WaitTrue" : 0
    Did it myself in under 10 minutes from build to test.

  • Outgoing Payment with Vendor Invoice reference on grid

    For Outgoing Payment has B1 docu. number but like to have Vendor's Invoice # displayed on the grid to know which one is which.  Should I use User Define Value for AP Invoice header to Banking > Outgoing Payment detail column?

    What is your B1 version and PL?  In our version, the Vendor Reference is default setting in the grid.
    Thanks,
    Gordon

  • Outgoing Payment with journal Entry

    Hi guys I need your help
    I need to be able to do an outgoing payment based on a journal entry. This is my code but I get this error:
    "Base document card & target document card do not match"
    The journal is based on an incoming payment that was over paid and has a remaining balance.
    Thanks
                oOutPay.DocTypte = SAPbobsCOM.BoRcptTypes.rCustomer;
                oOutPay.CardCode = "CC0001";
               //oOutPay.Invoices.Add();
                oOutPay.Invoices.DocEntry = 106;
                oOutPay.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry;
                oOutPay.TransferAccount = globals.bankTrAccOP;
                oOutPay.TransferSum = 80;
                int lRetCode;
                lRetCode = oOutPay.Add();

    Hi Costas,
    In order to based the payment on Journal Entry,
    You have to set the docline of the Payment to Journal Entry Line which has the same cardcode as your payment card code like this
    oPay.Invoices.DocLine = oJE.Lines.Line_ID
    What I do is I iterate through the Journal Entry to look for the line like this :
    If .Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_JournalEntry _
                                        Or .Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_PaymentAdvice Then
        Dim oJE As SAPbobsCOM.JournalEntries
        oJE = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
        oJE.GetByKey(.Invoices.DocEntry)
        For iLines As Integer = 0 To oJE.Lines.Count - 1
        oJE.Lines.SetCurrentLine(iLines)
        If oJE.Lines.ShortName = .CardCode Then
        'If the line card equal payment card code, then assign the docline id
              oPay.Invoices.DocLine = oJE.Lines.Line_ID
              System.Runtime.InteropServices.Marshal.ReleaseComObject(oJE)
              oJE = Nothing
              Exit For
         End If
        Next
    End If

  • Problems creating the Master Repository with MS SQL Server 2000

    Hello guys!
    I can't create the Master Repository with MS SQL Server 2000 database.
    Wath is the correct adress in the URL?
    I select the Driver: com.microsoft.jdbc.sqlserver.SQLServerDriver and the URL: *jdbc:microsoft:sqlserver://<host>:<port>;SelectMethod=cursor[;<property>=<value>...]*
    Thanks
    Maurício
    Edited by: user857262 on 03/10/2008 10:05

    Hi Maurício,
    For MS SQL Server the following drivers should avaliable in /drivers folder (http://www.inetsoftware.de/),
    * msutil.jar
    * mssqlserver.jar
    * msbase.jar
    JDBC Driver is:
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    JDBC URL is:
    jdbc:sqlserver://serverName\instance:port;property=value[;property=value]
    Example,
    jdbc:sqlserver://myHost:1433;selectMethod=cursor;databaseName=myDB
    Thanks,
    G

  • Outgoing Payment with Bank Charges

    Most of the client wants to do payment (in/out) to have more than one charges in the same transaction.
    In SAP B1 2005B can have one bank charges a/c setting from incoming, but how is the process on outgoing. there's no bank charge can be selected.
    If doing payment on a/c and do bank reconciliation, it takes serveral steps to complete operation and not in the related journal entry.
    Any suggestion?

    Hi,
    Maybe you could try to do what I solve that problem in 2005A version.
    I select credit card (from payment means) --> credit card name --> bank charges (click define new (to create bank charges) from vouchers grid/form in the payment means --> credit card --> vouchers) --> select G/L account but you must define bank charges account in liabilities or in other drawer but all depends on your accounting. Consults your accounting staff for best option. This also could be done along with other payment means, for example cash, bank transfer or check.
    Rgds,

Maybe you are looking for

  • Best Practice Regarding Maintaining Business Views/List of Values

    Hello all, I'm still in the learning process of using BOXI to run our Crystal Reports.  I was never familiar with the BO environment before but I have recently learned that every dynamic parameter we create for a report, the Business View/Data Connec

  • #include not work at Flash 9????

    Yesterday I downloaded the Flash 9. I´m at my first site build on it. First error, that returned in Output panel: [quote]**Error** Scene 1, Layer 'AS~', Frame 1 : Line 1, Column 1 : [Compiler] Error #1093: Syntax error. #include "preloader.as"; Refer

  • Where does Lightroom keep my photos?

    I always import my photos from my CF card into my USB external hard drive. When I view my hard drive, Finder shows all my photos and I always thought that's where my pictures were. Then, I unplugged my laptop, took it to another location, and run Lig

  • What's new in the latest itunes user agreement

    This has bugged me for years and Finally it gets in the news that people don't know what they are agreeing too. Nobody want's to (or needs to)  read through the whole aggreement every time it is changed. Does anybody know if Apple or a third party si

  • Creating a graph based on a quadratic equation.

    Hello, I just got my first Mac and iWork 09. I'm trying to create a graph in Numbers 09 based on a quadratic equation however I cannot find any way of doing this. I just need to some simple graphs based on equations such as y = x^2 + 3x + 5 How do I