Unable to use di api to add a journal entry

Hi All,
I had trouble with adding a journal entry
the following are my codes:
        oJournal = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
        oJournal.DueDate = Now
        oJournal.ReferenceDate = Now
        oJournal.TaxDate = Now
        ' first line
        oJournal.Lines.AccountCode = "11110101"
        oJournal.Lines.ContraAccount = "C00001"
        oJournal.Lines.Credit = 1000
        oJournal.Lines.Debit = 0
        oJournal.Lines.ShortName = "11110101"
        ' second line
        oJournal.Lines.Add()
        oJournal.Lines.AccountCode = "C00001"
        oJournal.Lines.ContraAccount = "11110101"
        oJournal.Lines.Credit = 0
        oJournal.Lines.Debit = 1000
        oJournal.Lines.ShortName = "C00001"
        ' add journal entry
        lRetCode = oJournal.Add()
The error message is " [JDT1.Account][line: 2] , 'Tax account has not been defined for the selected tax code'"
Cheers

I've tried the following codes but I got the same error
        Dim oJournal As SAPbobsCOM.JournalEntries
        oJournal = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
        oJournal.DueDate = Now
        oJournal.ReferenceDate = Now
        oJournal.TaxDate = Now
        oJournal.Series = 1023
        ' first line
        oJournal.Lines.AccountCode = "11110101"
        oJournal.Lines.Credit = 1000
        oJournal.Lines.Debit = 0
        oJournal.Lines.DueDate = Now
        oJournal.Lines.TaxDate = Now
        oJournal.Lines.ReferenceDate1 = Now
        ' second line
        oJournal.Lines.Add()
        oJournal.Lines.AccountCode = "C00001"
        oJournal.Lines.Credit = 0
        oJournal.Lines.Debit = 1000
        oJournal.Lines.DueDate = Now
        oJournal.Lines.TaxDate = Now
        oJournal.Lines.ReferenceDate1 = Now
        ' add journal entry
        lRetCode = oJournal.Add()

Similar Messages

  • Requirement for add a journal entry of unbalnce FC  amount

    Hi,expert !
    I want to add a journal entry of unbalnce FC  amount.
    for example: assume the exchage rate is 1.5
    AccountNo  Debit(FC)          Credit(FC)  Debit Credit
    1001                usd 100                           150
    1002                                                                  150
    How can I make it ? Any help  is appreicated . Thank you in advance.

    Hi,
    There is a master setting inorder to allow unbalanced transaction in the journal entry.
    Administration->System Initialization->Document setting->Per document tab->Select Document-Journal Entry
    Uncheck the option 'Block &Unbalanced FC Journal Entry' and update.
    This will allow you to add unbalanced transaction.
    If you need to make a single manual journal entry,Open Journal entry window->Go to form setting->Document tab->General tab-'Allow Unbalanced Transaction in FC',select this option.
    Hope this is helpful!

  • How to add a Journal Entry - Error "Code undefined"

    Hi, i want to add a simple journal entry by using DI-Api. The problem is, i always get the error message "Code undefined" when I use the Debitor-AccountCode.
    My code is like that:
    oJ.TaxDate=dTaxDate;
    oJ.AutoVat=BoYesNoEnum.tNO;
    oJ.Lines.AccountCode="2000";    //Customer
    oJ.Lines.ContraAccount="4020";
    oJ.Lines.Credit=dCredit;
    oJ.Lines.Debit=dDebit;
    oJ.Lines.TaxDate=odTaxDate;
    oJ.Lines.ShortName="23121089";
    oJ.Lines.LineMemo="Ausgangsrechnung";
    oJ.Lines.Add();
    oJ.Lines.AccountCode="3500";   //VAT
    oJ.Lines.ContraAccount="23121089";
    oJ.Lines.Credit=dCredit;
    oJ.Lines.Debit=dDebit;
    oJ.Lines.TaxDate=odTaxDate;
    oJ.Lines.ShortName="23121089";
    oJ.Lines.LineMemo="Ausgangsrechnung";
    oJ.Lines.Add();
    oJ.Lines.AccountCode="4020";
    oJ.Lines.ContraAccount="23121089";
    oJ.Lines.Credit=dCredit;
    oJ.Lines.Debit=dDebit;
    oJ.Lines.TaxDate=odTaxDate;
    oJ.Lines.ShortName="23121089";
    oJ.Lines.LineMemo="Ausgangsrechnung";
    oJ.Add();

    Hi,
    Here is the code to find the BP account number:
    oRecordset = ((SAPbobsCOM.Recordset)(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)));
                        oRecordset.DoQuery("SELECT [LinkAct_3] FROM [dbo].[OACP]");
                        oRecordset.MoveFirst();
                        if (oRecordset.EoF == true) // We have a Error
                            oCompany.GetLastError(out vmp_B1_Error_Code_int, out vmp_B1_Error_Message_string);
                            SBO_Application.MessageBox("Add-On Error (Forgestik Inc.): ERR-789 \n " + "Cash Account does not Exist "+ vmp_B1_Error_Message_string, 1, "Ok", "", ""); // My Error Code
                        else
                            vm_CachAccountNumber_string = Convert.ToString(oRecordset.Fields.Item("LinkAct_3").Value);
    ...Then you have to use the system account number "_SYS00000000353" not the displayed account number in B1...
    Thank you,
    Rune

  • Unable to use WFDDisplaySinkStart API in a Windows 8.1 Desktop application project.

    Does anyone know where the following files are located within the SDK?
    Header: Wfdsink.h
    Library: Wifidisplay.lib
    Thanks!

    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess they've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • Help! How to use pay_element_link API

    Hi all,
    I am developing HRMS Interface to transfer employee element data from other system into EBS. And I want to use Pay element Link API to implement the requirement.
    The requirement is:
    1.     Using the primary key of NATIONAL_IDENTIFIER_NUMBER (ssn) check to see if the employee exists as an active employee in Oracle.
    2.     Validate that the Element is a valid element and retrieve the Benefit Type from the DFF (ELEMENT_INFORMATION11). If the element is invalid or does not have a Benefit Type defined, flag the record as ‘REJECTED’ and write the error to the log file and move to next record in staging.
    3.     If the employee has another active element assigned for the same Benefit Type, using the API’s terminate the existing element for that Benefit Type.
    4.     Using the API’s add the new element to the employee with the appropriate element entries.
    5.     Flag the status of the record in staging to ‘PROCESSED’.
    The step1 and step2 is logic adjustment. And I have finished them. Next I will finish 3,4 and 5. The fifth step is easy to approach. I can not do 3 and 4 for I do not konw how to use the pay_element_link_API. And I know the 3 wiil use PAY_ELEMENT_LINK_API.update_element_link, the 4 step will use PAY_ELEMENT_LINK_API.CREATE_ELEMENT_LINK. But the most difficult is I do not konw what to pass the parameter to update_element_link and create_element_link. I do not know the meaning of the two procedure's parameter.
    When the element has many entry values, how to import these entry value into the EBS. For example, an element names 'Retirement Plan' and the element has a input value names 'Amount' and the value is 80$. So I want to know how to import the 80$ into EBS by the API. Just means, the 80$ will pass to which one parameter in the create_element_link or update_element_link.
    Please give me some ideas. Thank you so much

    On troubleshooting the HR api's you can use the pyupip logging mechanism . This would allow you to pinpoint what stored procedure section is being executed when the error ocurred.
    set serveroutput on
    spool trace.log
    begin
    hr_utility.set_trace_options ('TRACE_DEST:DBMS_OUTPUT');
    hr_utility.trace_on;
    -- your code here
    hr_utility.trace_off;
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    hr_utility.trace_off;
    END;
    spool off

  • How to add a petty cash payment in journal entry

    HI, I was just wondering if anybody could help me with regards to making a petty cash payment, for example if i went to the shop for and spent £15.00 on stationary etc, how would i post this payment in the journal entry screen?
    many thanks.

    Hello RWCS...welcome to the forums...
    OK, first things first - the definition of petty cash.  Petty cash is a function inside any company which allows employees to purchase products out of their own pocket and allows the Petty Cash Person to pay/reimburse for some item or services under a certain amount (say $25).  Petty Cash is generally a sum of money maintained in the company in a box or drawer - that is what the accounts says - petty cash.   The WHOLE purpose of petty cash is to avoid cutting a check for each and every minor purchase or payment - so there would be no payment created at all until it is time to replenish Petty Cash with more money.
    So in essence, if you are using Petty Cash, there is no journal entry or SAP B1 payment for individual transactions until it is time to replenish.  The Petty Cash Clerk (person having the box or drawer) would collect receipts as the money is being paid out. 
    At a certain point in time (usually at month-end or when the cash is low in the Petty Cash drawer), a journal entry is made Crediting Petty Cash and Debiting the various Expense Accounts by using the receipts collected.
    Then an AP "Service Type" Invoice and an outgoing payment is made to the Petty Cash Person where the clerk goes to the bank and gets more money for the drawer.  While creating the AP Invoice, the Petty Cash GL Account is selected on the line.  That will create an automatic journal entry of credit to Operating Cash and debit to the Petty Cash.
    If you are not doing this procedure, you do not have Petty Cash.  So hopefully that describes what you are doing...
    Regards - Zal

  • Reversing a journal entry through API

    Hello All,
    Can anyone please tell me what is the API for reversing the journal entries.
    When I searched I found that there is an API XLA_JOURNAL_ENTRIES_PUB_PKG for reversing journals, but I could not find any procedure inside it for reversing the journal entry.
    Regards,
    Rakesh.

    thanks for your reply.
    I wanted to reverse a journal that is already posted. I got the API name: I was looking at the wrong version of oracle. The above mentioned one was for 12.1.
    XLA_JOURNAL_ENTRIES_PKG.reverse_journal_entry (R 12.0.6)
    Regards,
    Rakesh.

  • Add Journal Entries Report - Output to Request Set

    Hi All,
    I'm trying to create a Request Set for the receivable application
    The request set should contains two Programs
    1- AR: Journal Entries Report
    2- Journal Entries Report - Output
    I defined the request set and when i start adding the programs , i selected the first program AR: Journal Entries Report from the list and gave it sequence 10
    when i tried to add the other Report "Journal Entries Report - output" i didn't find it in the list and i'm not able to add it
    1-Do any one know why this program doesn't appeat in the list ?
    2- If i created a copy of this program and gave it other name , this program in the definition doesn't have any parameters although a parameters must be passed to it from the first request AR : Journal Entries report. how to pass parameters from the first program to it
    Best Regards

    nuppara,
    I need to add this report to the request set as it's a workaround to get the output of the AR: Journal Entries Report as Excel - I created a post asking this question also , u already replied to it.
    My workaround is like this , the AR: journal Entries Report automatically sumbit the program "Journal Entries Report - Output" based on the parameters that the user select
    Print Detail By Account , Print Detail By Category , Print Summary By Account , Print Summary By Category
    if i want to to make this report to be an Excel output so i'll have to create 4 templates but won't be able to assign the correct template to it , as the main request AR: journal Entries report calls it automaticcaly, and may run it 4 times
    so my workaround was like this
    i'll create 4 request sets ,
    the first RS will be for example AR: journal Entries Detail By Account, i'll add to it 2 programs the AR: journal Entries Report , and the Journal Entry Report - output -OR a program copied from it with the same design and i'll add parameters to it-
    i'll force the parameters of the AR: Journal Entries in this request set to be Print Detail By Account = 'Y' and the other options = 'N' so the report will call Journal Entry Report - output with the parmeter layout= 'Print Detail By Account ' will be displayed as text ... when it finish the request set will run the Journal Entry Report - output -OR the copied program - that i'll assign the correct template and data definition for it, so it'll run and display the output as Excel .
    I need to try this solution, but i was not able to add the journal Entries Report - Output to the request set :( and i'm not sure if i'll create a copy from it will be added or not,
    and also i'm not sure if this workaround may work , as i know when the AR: Journal Entires report complete it delete the data from the temp table so the 2nd request may work on an empty table , or it'll have a request_id different from the request_id of the temp table so it won't select any row
    all of this is just a brain storming to find the solution. :( i'm thinking by a loud voice here :-D
    i know it may not work but at least to try it i need to add this report to the request set.

  • How can i add custom attributes to a new Class Object using the API ?

    Hello everyone,
    Here is my problem. I just created a subclass of Document using the API (not XML), by creating a ClassObjectDefinition and a ClassObject. Here is the code :
    // doc is an instance of Document
    ClassObject co = doc.getClassObject();
    ClassObjectDefinition cod = new ClassObjectDefinition(ifsSession);
    cod.setSuperclass(co);
    cod.setSuperclassName(co.getName());
    cod.setName("MYDocument");
    ClassObject c = (ClassObject)ifsSession.createSchemaObject(cod);
    Everything seems to be OK since i can see the new class when i use ifsmgr. But my question is : how can i add custom attributes to this new class ? Here is what i tried :
    AttributeDefinition value = new AttributeDefinition(ifsSession);
    value.setAttribute("FOO", AttributeValue.newAttributeValue("bar"));
    c.addAttribute(value);
    But i got the following error message :
    oracle.ifs.common.IfsException: IFS-30002: Unable to create new LibraryObject
    java.sql.SQLException: ORA-01400: impossible d'insirer NULL dans ("IFSSYS"."ODM_ATTRIBUTE"."DATATYPE")
    oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewSchemaObject(oracle.ifs.server.S_LibraryObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.NewSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    oracle.ifs.beans.SchemaObject oracle.ifs.beans.LibrarySession.createSchemaObject(oracle.ifs.beans.SchemaObjectDefinition)
    void fr.sword.ifs.GestionDocument.IFSDocument.createDocument(java.lang.String)
    void fr.sword.ifs.GestionDocument.IFSDocument.main(java.lang.String[])
    So, what am i doing wrong ?
    More generally, are we restricted in the types of the attributes ? (for example, would it be possible to add an attribute that would be an inputStream ? Or an object that i have already created ?).
    Any help would be appreciated. Thanks in advance.
    Guillaume
    PS : i'm using Oracle iFS 1.1.9 on NT4 SP6 and Oracle 8.1.7
    null

    Hi Guillaume,
    you're welcome. Don't know exactly, but assume that ATTRIBUTEDATATYPE_UNKNOWN
    is used to check for erronous cases only
    and it shouldn't be used otherwise.
    Creating your own objects could be simply done via
    ClassObject ifsClassObject;
    DocumentDefinition ifsDocDef = new DocumentDefinition(ifsSession);
    // get class object for my very own document
    ifsClassObject = ClassObject.getClassObjectFromLabel(ifsSession, "MYDOCUMENT");
    // set the class for the document i'd like to create
    ifsDocDef.setClassObject(ifsClassObject);
    // set attributes and content for the document...
    ifsDocDef.setAttribute("MYFOO_ATTRIBUTE",....);
    ifsDocDef.setContent("This is the content of my document");
    // create the document...
    PublicObject doc = ifsSession.createPublicObject(ifsDocDef);
    null

  • Add Goods Receipt using DI API

    Hi all,
    I want to add a new Goods Receipt using DI API, for each of the lines:
            oBatchReceipt.Lines.SetCurrentLine(1)
            oBatchReceipt.Lines.ItemCode = "ItemA"
            oBatchReceipt.Lines.WarehouseCode = "WH01"
            oBatchReceipt.Lines.Quantity = 1000
    instead of entering the unitcost of the item, i want to enter the line total.
    (unitcost or oBatchReceipt.Lines.Price is commented out)
            'oBatchReceipt.Lines.Price = costUnit
            oBatchReceipt.Lines.LineTotal = 1563
    so, when the Goods Receipt is added, there is no error popped up, but the total of created Goods Receipt is 0 (zero).
    I want to use the LineTotal instead of Price. Using the SBO system UI, user can enter quantity and linetotal and sytem will automatically calculate the price. But using DI API, i dont think it works because someone from forum says that LineTotal is NOT read/write property as written in SDK documentation.
    Anyone knows about this issue?
    Thanks.
    Cheers'
    erwine

    Hi Erwine Sukardy ,
                                   For eg.  you have used  an item  named as  " ItemA". Please go to the "Item Mater Data " . Set the unitprice as you required .Then no need to enter unitprice at line level using DIAPI .
                                If unitprice exists in item master data then . It will automatically calculates the LineTotal.
                          Hope it helps....,
    Best Regards
    V.Rangarajan

  • Add attachments using workflow api throwing error

    Hi,
    I am getting the following error when i am trying to add attachments using worklist API.
         Missing class: invokeBPEL.MetaData
         Dependent class: com.evermind.io.ClassLoaderObjectInputStream
         Loader: oc4j:10.1.3
         Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at hw_services.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.lang.Class.forName0 (Native method) [unknown, by unknown]
         at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass (ClassLoaderObjectInputStream.java:33) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.io.ObjectInputStream.readNonProxyDesc (ObjectInputStream.java:1538) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readClassDesc (ObjectInputStream.java:1460) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1693) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject (ObjectInputStream.java:339) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.server.rmi.RMIProtocol$Version.unmarshallParameterDirectly (RMIProtocol.java:402) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol$Version_1_0.unmarshallParameter (RMIProtocol.java:471) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readObject (RMIProtocol.java:80) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readValue (RMIProtocol.java:161) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleMethodInvocation (ServerRmiMessageHandler.java:514) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleOrmiRequest (ServerRmiMessageHandler.java:272) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.dispatchRequest (ServerRmiMessageHandler.java:241) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.processReceivedCommand (RMIServerConnection.java:176) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.handleCommand (RMIConnection.java:152) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands (RMIConnection.java:127) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.listenForOrmiCommands (RMIServerConnection.java:390) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.run (RMIConnection.java:107) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]
    Exception in thread "main"
    This is the code i used
         String userId = "oc4jadmin";
         String password = "welcome1";
         String sTaskId = "";
         IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT);
         System.out.println("Before getting TaskService");
         ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
         System.out.println("After getting TaskService");
         IWorkflowContext wfCtx = querySvc.authenticate(userId,password,"jazn.com",null);
         System.out.println("Last out");
         Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN,Predicate.OP_EQ,IWorkflowConstants.TASK_STATE_ASSIGNED);
         List queryColumns = new ArrayList();
         queryColumns.add("TITLE");
         queryColumns.add("PRIORITY");
         queryColumns.add("STATE");
         queryColumns.add("TASKID");
         queryColumns.add("TASKNUMBER");
         List tasks = querySvc.queryTasks(wfCtx,
                   queryColumns,
                   null, //Do not query addtional info
                   ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP,
                   null, //No keywords
                   pred, //No custom predicate
                   null, //No special ordering
                   0, //Do not page the query result
                   0);
         System.out.println("Task Size !!" +tasks.size());
         if (tasks != null)
         String[] taskList = new String[tasks.size()];
         for (int i=0; i< tasks.size(); i++)
         Task t = (Task)tasks.get(i);
         taskList[i] = t.getSystemAttributes().getTaskId();
         System.out.println("Found task: "+taskList);
         sTaskId = taskList[i];
         else
         System.out.println("Did not find any tasks");
         Task task = querySvc.getTaskDetailsById(wfCtx, sTaskId);
         //Add Attachments
         FileInputStream fs = new FileInputStream("D:/Test.txt");
         ITaskService itask = wfSvcClient.getTaskService();
         MetaData mdata = new MetaData();
         mdata.setMimeType("text/html");
         mdata.setContent("D:/Test.txt");
         mdata.setInputStream(fs);
         mdata.setName("Test Document");
         itask.addAttachment(wfCtx, sTaskId, mdata);
         if (task != null)
         System.out.println("Completing task: "+task.getTitle());
         wfSvcClient.getTaskService().updateTaskOutcome(wfCtx, task, "APPROVE");
    Kindly let me know how to solve this issue.
    Thanks,
    Gomathi

    hi,
    Actually i have used AttachmentType..MetaData is the class which i created for implementing AttachmentType as it is Interface Class. Here is the code of MetaData class.
    public class MetaData implements AttachmentType,java.io.Serializable{
         public String getBoundary() {
              // TODO Auto-generated method stub
              return null;
         public String getContent() {
              // TODO Auto-generated method stub
              return null;
         public InputStream getInputStream() {
              // TODO Auto-generated method stub
              return null;
         public String getMimeType() {
              // TODO Auto-generated method stub
              return null;
         public String getName() {
              // TODO Auto-generated method stub
              return null;
         public String getSystemVersionFlag() {
              // TODO Auto-generated method stub
              return null;
         public String getTaskId() {
              // TODO Auto-generated method stub
              return null;
         public String getURI() {
              // TODO Auto-generated method stub
              return null;
         public String getUpdatedBy() {
              // TODO Auto-generated method stub
              return null;
         public int getVersion() {
              // TODO Auto-generated method stub
              return 0;
         public void setBoundary(String arg0) {
              // TODO Auto-generated method stub
         public void setContent(String arg0) {
              String cont = null;
              cont = arg0;
         public void setInputStream(InputStream arg0) {
              InputStream sStream = null;
              sStream = arg0;
         public void setMimeType(String arg0) {
              String mime = null;
              mime = arg0;
         public void setName(String arg0) {
              String sname = null;
              sname = arg0;
         public void setSystemVersionFlag(String arg0) {
              // TODO Auto-generated method stub
         public void setTaskId(String arg0) {
              // TODO Auto-generated method stub
         public void setURI(String arg0) {
              // TODO Auto-generated method stub
         public void setUpdatedBy(String arg0) {
              // TODO Auto-generated method stub
         public void setVersion(int arg0) {
              // TODO Auto-generated method stub
    kindly tell me how can i solve this issue.
    Thanks,
    Gomathi
    Edited by: user647559 on Sep 23, 2008 10:05 PM

  • How to add a polygon to mapviewer using Javascript API

    Hi,
    I am using JavaScript API for the MapViewer.
    Using redlining tool, my application allows user to draw polygon onto the map.
    I would like to have union, difference and intersect tools. I know the back end logic can be done using using JTS or SDO_Union, SDO_difference, and SDO_intersection. but how do i display the result polygon on the map? Note that I am not going to store the polygon in the database.
    Thanks for any ideas.

    Hi,
    If I understand well you are using Oracle Maps. User do some redlining, then you somehow makes FOI polygons. Then you get the coordinates of the polygons and send them to the back-end where you can use spatial functions and get the coordinates of the new polygon.
    You can store those coordinates in i.e. hidden input field on page (if you use JSF it is very simple) and then use JavaScript to parse them and Oracle Maps API to create new FOI polygon and add it to mapviewer object. One disadvantage of this concept is that reloading of page (submit) is necessary.
    Branislav

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Add Sales Opportunity using DI API

    Hello Friends,
        I am trying to add Sales Opportunity using DI API.I want to set Potential amount using DI API So I set MaxLocalTotal but while compiling code its give error.Its Read only.
    If I add without potential amount than its gives me error  "Potetial Amout is missing"
    What should I do??
    My Code is 
                   SAPbobsCOM.SalesOpportunities vSOpp;
                    vSOpp = (SAPbobsCOM.SalesOpportunities)globals1.oCompany.GetBusinessObject  (SAPbobsCOM.BoObjectTypes.oSalesOpportunities);
                    vSOpp.CardCode = txtBPCode.Text;
                    if( txtCntctPerCode.Value!="")
                    vSOpp.ContactPerson = Convert.ToInt32(txtCntctPerCode.Value);
                    vSOpp.OpportunityName = txtOppName.Text;
                    vSOpp.SalesPerson = Convert.ToInt32(ddlSEmp.SelectedValue);
                   //vSOpp.WeightedSumLC = Convert.ToDouble(txtPotAmt.Text);
                    vSOpp.MaxLocalTotal = Convert.ToDouble(txtPotAmt.Text);       
                   culture = new CultureInfo("en-US", true);
                    currentprovider = CultureInfo.CurrentCulture;
                    dt1 = DateTime.ParseExact(txtSDate.Text, "dd/MM/yyyy", culture);
                    vSOpp.StartDate = dt1;
      if (vSOpp.Add() != 0)
                        //ResultMessage1.ShowFail("Failed to add a Activity");
                        globals1.oCompany.GetLastError(out nErr, out errMsg);
                        if (0 != nErr)
                            ResultMessage1.ShowFail(globals1.oCompany.GetLastErrorDescription());
                            globals1.oCompany.Disconnect();
                            return;
                    else
                        ResultMessage1.ShowSuccess("Activity added Successfully");
    Please help me to solved this problem.
    Thanks & Regards,
        Swati

    Hi folks,
    I'm facing the same problem. This issue concerns DI API of SAP Business One 8.8 (my version is SP 00 PL 11) in particular.
    I've used the 2007 version so far and even though the MaxLocalTotal field in Sales Opportunity object is read-only, by writing the same value in the field with the same name on the last Opportunity Line I obtain the right value in the header.
    In this version of the API, that field seems to be mandatory instead.
    Does anyone have any suggestion? Thank you in advance.

  • Unable to use  'findCatalog' in oracle.iam.catalog.api.CatalogService api

    Hi all,
    In OIM 11gr2, I am unable to use the method "findCatalog"
    , in "package oracle.iam.catalog.api.CatalogService". Did any one else face the same issue. Any pointers appreciated.
    The description of the method as per the 11gr2 api guide is as follows
    findCatalog(SearchCriteria searchCriteria, int lowerBound, int higherBound, java.lang.String sortField, CatalogSearchCriteria.SortCriteria sortCriteria)
    Find catalog on the basis of input provided as searchCriteria that has been provided by User, It will return the objects after applying the entity level security.
    Looking forward to hearing from you,
    Many thanks in advance
    Warm regards,
    818343

    Since my external OC4J is using JAXB 1.0 ,
    I created a shared library called "fusion_jaxb" and added the following file
    jsr173_api.jar
    jaxb-api.jarI think you will also need the jaxb-impl.jar, which actually provides the class that is being requested but not available.
    D:\java\jaxb-ri-20070122\lib>jar tf jaxb-api.jar | grep ContextFactory
    D:\java\jaxb-ri-20070122\lib>jar tf jaxb-impl.jar | grep ContextFactory
    com/sun/xml/bind/v2/ContextFactory.class
    I had a small writeup of using JAXB2 here:
    http://buttso.blogspot.com/2007/09/using-jaxb-20-with-oc4j-1013x.html
    -steve-

Maybe you are looking for

  • How to get the size of the report using RE sdk or query?

    Hi, I want the size of report using RE sdk or using query. How can i get this? Please help Thanks in advance Amol Mali

  • Transfering music from Iphone to Blackberry z30

    Hello , I am loving my Blackberry Z30 especially after the last update. I was able to transfer all my info from my previous Iphone all exept my Music. I used an app called device switch and it worked great. My question is what is the easiest or best

  • Watch apple tv and play music on macbook

    Is it possible to play music on my macbook whilst someone else is watching a movie on appletv streamed from the macbook. If I enable both speakers I can listen to the music on my mac and it plays over the movie on apple tv!?

  • XSD:Date conversion

    I am generating an XML data source from PS Query using date information (PS 8.8, PT 8.49.11) ... the Schema file that PS generated assigned xsd:Date to the date fields, which expects YYYY/MM/DD. On the data template I am trying to display DD/MM/YYYY,

  • NAC using WSUS server

    Hi, Does anyone know how to use WSUS Server in NAC Appliance. I can able to authenticate in the network with the clean access agent. But everytime I used the WSUS requirement it pass through from normal login role to temporarily role for remediation.