Can i create SalesOrder using SalesQuotation

Hi all,
    I want to create SalesOrder with reference using the SalesQuotation. How can i achieve this.
    I am using JAVA to develop this. I am using DI API to achieve this. I am creating SalesOrder directly by giving the items and their quantities and succeded. But when i want to give the SalesQuotation number Reference while creating salesOrder it is giving error.
-5002Item no. is missing  [ORDR.ObjType]
com.sap.smb.sbo.wrapper.com.ComFailException: Invoke of: DoQuery
Source: SAPbobsCOM.Recordset.6.7
Description: 1). [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'FOR'.
2). [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
     at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Native Method)
     at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Unknown Source)
     at com.sap.smb.sbo.wrapper.com.Dispatch.callN(Unknown Source)
     at com.sap.smb.sbo.wrapper.com.Dispatch.call(Unknown Source)
     at com.sap.smb.sbo.api.Recordset.doQuery(Unknown Source)
     at SalesOrderCreate.main(SalesOrderCreate.java:133)
Can any body give me a sample code that how can we create salesOrder using SalesQuotation.
regards,
JAYA

Hi
I've never tried doing it in java. But i here is an example of how it is done in VB.Net, im sure it will help you connect the dots. This example makes a invoice based on a sales order
Dim oInvoice As SAPbobsCOM.Documents
        oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
        oInvoice.CardCode = BPCode.Text
        oInvoice.DocDueDate = Now
        oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
        'OrderStr is sales order DocEntry,not Docnum
        oInvoice.Lines.BaseEntry = CInt(OrderStr)
        oInvoice.Lines.BaseLine = 0
        oInvoice.Lines.Add()
        oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
        oInvoice.Lines.BaseEntry = CInt(OrderStr)
        oInvoice.Lines.BaseLine = 1
        lRetCode = oInvoice.Add
        oCompany.GetLastError(lErrCode, sErrMsg)
        If lRetCode <> 0 Then
            MessageBox.Show("Not Added" & lErrCode & " " & sErrMsg)
        ElseIf lRetCode = 0 Then
            'oCompany.GetNewObjectCode(OrderStr)
            MsgBox("Added Invoice")
        End If
please not, OrderStr is sales order DocEntry,not Docnum
Hope this helps

Similar Messages

  • Can I create and use more than one repository on OVM 2.1.5

    The version of Oracle VM I am using is 2.1.5 .
    I wonder can I create and use more than one repository on OVM 2.1.5. Because I want to install different GOS on different disks.
    I know in Oracle VM 2.2 we can use following commands to realize that.
    a. #/opt/ovs-agent-2.3/utils/repos.py –n /dev/mapper/mpathxp1
    b. #/opt/ovs-agent-2.3/utils/repos.py –r UUID
    c. #/opt/ovs-agent-2.3/utils/repos.py –i
    And other repositories can also be mounted and found under /var/ovs/mount/UUID.
    But in Oracle VM 2.1.5, seems just one repository can be created and mounted. For example:
    At first, I create a repository using mpath1p1:
    a. # mkfs.ocfs2 /dev/mapper/mpath1p1
    b. #/usr/lib/ovs/ovs-makerepo /dev/mapper/mpath1p1 C "cluster root"
    c. I can find the repository has been mounted under /OVS.
    But if I want to use "/usr/lib/ovs/ovs-makerepo /dev/mapper/mpath2p1 C "cluster root" to create another repository, and check the mount status using command "mount", these two disks are all have been mounted under /OVS.
    "# cat /etc/ovs/repositories", only mpath1p1 with UUID was recorded there.
    After reboot, only repository with mpath1p1 was mounted under OVS.
    Can anyone tell me how to use more than one repositories on OVM 2.1.5. Do I have to install all the GOSs on the same disk and repository.
    Thank you very much.

    Now I've known how to create different repository. They will be mounted under /OVS/UUID. Thanks.

  • We can't create form using dblink  and synonim

    We have created a dblink pointing to a table in the remote database.
    When we create a form based on table or view using this dblink, we get the error "page not found".
    We read from
    Re: I can't create form using dblink
    that we must create a synonim, and this was done creating one in the same schema of the db-link using the "Database Objects" of oracle portal 10g (external db is an oracle 9.0.2).
    The new synonim work (tested with reports and pl/sql page)
    but if we click on "Grant Access" (of the synonim) we get the following error :
    Error: The underlying object of the synonym does not exist, is a remote object or is not of type function, procedure, package, sequence, synonym, table or view. (WWV-17076)
    Does form work only with table and view of the portal database (not external one)? or have we loose something in the creation of the synonim?
    Have someone succesfully created a form based on a db-link towards an external database?
    Thanks to all.

    Hei guys, has nobody created succesfully a data-driven forms based on a dblink towards an external database?
    I can't believe this!!!!

  • Can i create report using more than one Business Area ?

    Hi Gurus,
    Can i create report using more than one Business Area?.Could anybody tell me that report will work?.
    Vikram

    You should have no problem creating a report using more than one Business Area, we share folders across BAs all the time for ease of management. As long as your joins exist its not a problem.
    Matt Topper
    TUSC, The Oracle Experts
    [email protected]

  • How can I create Droplets using Actions with several Stops?

    My Droplets (using Actions but with several Stops) work very nicely when using a single image source. However when using multiple images thing start to go crazy.
    At the first stop on the first image a pop-up emerges asking me to continue to the next image or stop. If I select stop I can continue with the Action for this first image and complete the Action on that first photo.
    If I select continue it halts the action on that photo at the first stop then opens the 2nd image and repeats the action to the first stop on the next photo then the pop-up appears again and the cycle repeats.
    How can I create Droplets using Actions with several Stops?

    I don't believe this is possible when starting from Java. I think you need to start with a WSDL to get this to work. I am curious as to why having multiple WSDLs is an issue, would you care to eloborate.
    Thanks

  • Can we create cursor using the table created dynamically

    Dear all,
    Can we create the cursor using the table which is created dynamically using "Execute immediate" within the same procedure,
    or is there any way to call the table created dynamically ..
    please Do Help me in this
    thanks alot
    Edited by: khaja on Jan 18, 2009 10:57 AM

    Well, I don't think this approach is bad in any possible circumstances. It depends on the requirements we don't know. Yes, usually applications should not be designed in this way. But 'usually' does not mean 'never'. One possible case is described in Oracle's example Referencing Database Objects that Do Not Exist at Compilation. It's possible to assume that tables inv_01_2003, inv_04_2003, etc from the referenced topic What Is Dynamic SQL? are generated automatically by some job using dynamic create table stmt. If the OP has similar requirements tnen this approach is not bad. It may not be the best one but it at least is not so bad as you said.
    I believe that OPs know their requirements much better than me. This is why I always try to answer the exact question. If the approach is really ugly then I don't answer such questions at all.
    Regards,
    Dima
    Message was edited by:
    DimaCit

  • Can you create report using report painter with Tcodes:FAGLL03,FCHN

    Hi Experts,
    1.I want to create report using report painter by using tcodes FAGLL03,FCHN.Can i create with report painter?
    2.i never used report painter can anyone provide report painter pdf for ecc6.0
    3.can any oneguide me how to develop report in report painter by using this tcodes.
    4.If not possible can i do with report writer?
    Regards,
    naresh.
    Moderator: Don't mix report painter with the TCodes wyou mentioned; there is no link between them. Regarding Report Painter - search SDN. Respect the rules and don't cross-post: you asked the same unclear question in several forums!

    cross posted
    Edited by: nareshvarma on Jul 19, 2010 9:11 AM

  • Can we create sto using BAPI_PO_CREAT1

    BAPI_PO_CREAT1
    what are the required fields to create STO using above bapi.
    or
    any other bapi to create STO.
    Thanks & Regards,
    Ramesh.T

    Hi Friend,
    You can us the BAPI for creating STO.
    Document type will be UB.
    You need to pass value on supplying plant insted of vendor.
    Rest of the things are same as like creating PO.
    Regards
    Krishnendu

  • Can we create application using only bounded task flow ?

    I am new to ADF ..
    can we create application by using only bounded task flow ...?
    one unbounded task flow is necessary for any application ? ....
    i searched on net ..but its not became clear
    Thanks

    I believe that it requires you to have at least one unbounded task flow as the standard entrance point for the application. However, I don't think there is anything stopping you from having the unbounded task flow only have access to your first bounded task flow. However, one of the purposes of the unbounded task flow is to define the different acceptable entrance points to your application.

  • Can't create database using ASM (SOLVED)

    Hi all
    I'm trying to use ASM for the first time, on Oracle 10.2.0.1 on Solaris x64.
    I have installed the ASM instance into /opt/oracle/asm/10.2.0 and created disk groups. I have cssd running OK. I am able to start and stop the ASM instance without problems, and I can select from v$asm_diskgroup to confirm that disks are mounted OK.
    I have then installed Oracle EE separately into /opt/oracle/server/10.2.0. I first did a software only install, and now I am trying to create a DB.
    The problems come when I try to use this ASM instance to host a new database. I first tried to use DBCA to create a new database, but on database creation I got the following errors:
    ORA-00200: control file could not be created
    ORA-00202: control file: '+DBLIVE1'
    ORA-17502: ksfdcre:4 Failed to create file +DBLIVE1
    ORA-15001: diskgroup "DBLIVE1" does not exist or is not mounted
    ORA-15055: Message 15055 not found; No message file for product=RDBMS, facility=ORA
    ORA-01031: insufficient privileges
    I then told DBCA just to create the DB creation scripts, and I tried manually running these with SQL*Plus.
    When doing it with SQL*PLus, I initially got the same error as shown above. But then something changed (sorry, not sure what), and now the error I get is:
    CREATE DATABASE "NEONREL1"
    ERROR at line 1:
    ORA-01501: CREATE DATABASE failed
    ORA-00349: failure obtaining block size for '+DBLIVE1'
    ORA-01031: insufficient privileges
    I've put some debug info below, showing me succesfully connecting to the ASM instance and then attempting to create the DB using the db creation scripts, showing the error at the end. You can see that the oracle OS user is able to connect fine to ASM, then I swithc ORACLE_SID and ORACLE_HOME to the EE install and try to create the DB, at which point it apparently can't connect to ASM any more.
    I've tried the DB creation many times, and in between attempts I completely empty $ORACLE_HOME/admin/<dbname> and delete the files related to the attempted install from $ORACLE_HOME/dbs/ . I've also stopping/starting ASM, rebooting, and I've done the install of ASM and EE a couple of times over in case I made any mistakes in my earlier attempts.
    Any help would be much appreciated!
    Tom
    ##### CHECKING ASM
    oracle@neonrcom-db1:~$ uname -a
    SunOS neonrcom-db1 5.10 Generic_127128-11 i86pc i386 i86pc
    # css is running
    oracle@neonrcom-db1:~$ ps -ef | grep css
    oracle 498 1 0 21:46:40 ? 0:01 /opt/oracle/asm/10.2.0/bin/ocssd.bin
    # listener is running in the ASM instance
    oracle@neonrcom-db1:~$ ps -ef | grep tnsl
    oracle 1332 1 0 21:49:59 ? 0:00 /opt/oracle/asm/10.2.0/bin/tnslsnr LISTENER -inherit
    # ASM is only entry in /var/opt/oracle/oratab
    oracle@neonrcom-db1:~$ grep -v "^#" /var/opt/oracle/oratab
    +ASM:/opt/oracle/asm/10.2.0:N
    # I can connect to ASM fine, and it has diskgroups mounted.
    oracle@neonrcom-db1:~$ export ORACLE_HOME=/opt/oracle/asm/10.2.0
    oracle@neonrcom-db1:~$ export ORACLE_SID='+ASM'
    oracle@neonrcom-db1:~$ sqlplus "sys as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 21 20:53:10 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> set line 150
    SQL> select name, block_size, state, type, total_mb, free_mb from v$asm_diskgroup;
    NAME BLOCK_SIZE STATE TYPE TOTAL_MB FREE_MB
    DBARCH1 4096 MOUNTED EXTERN 2096856 2096784
    DBLIVE1 4096 MOUNTED EXTERN 4193904 4193812
    #### Contents of init.ora for new DB
    db_create_file_dest=+DBLIVE1
    db_recovery_file_dest=+DBARCH1
    db_recovery_file_dest_size=2147483648
    ##### DB INSTALLATION ATTEMPT
    oracle@neonrcom-db1:~$ export ORACLE_HOME=/opt/oracle/server/10.2.0
    oracle@neonrcom-db1:~$ export ORACLE_SID='NEONREL1'
    oracle@neonrcom-db1:~$ export PATH=$ORACLE_HOME/bin:$PATH
    oracle@neonrcom-db1:~$ /opt/oracle/server/10.2.0/admin/NEONREL1/scripts/NEONREL1.sh
    You should Add this entry in the /var/opt/oracle/oratab: NEONREL1:/opt/oracle/server/10.2.0:Y
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 21 22:10:54 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    specify a password for sys as parameter 1
    Enter value for 1: xxx
    specify a password for system as parameter 2
    Enter value for 2: xxx
    specify a password for sysman as parameter 3
    Enter value for 3: xxx
    specify a password for dbsnmp as parameter 4
    Enter value for 4: xxx
    specify ASM SYS user password as parameter 6
    Enter value for 6: xxx
    Connected to an idle instance.
    SQL> spool /opt/oracle/server/10.2.0/admin/NEONREL1/scripts/CreateDB.log
    SQL> startup nomount pfile="/opt/oracle/server/10.2.0/admin/NEONREL1/scripts/init.ora";
    ORACLE instance started.
    Total System Global Area 1.9294E+10 bytes
    Fixed Size 2054976 bytes
    Variable Size 2264925376 bytes
    Database Buffers 1.7012E+10 bytes
    Redo Buffers 14721024 bytes
    SQL> CREATE DATABASE "NEONREL1"
    2 MAXINSTANCES 8
    3 MAXLOGHISTORY 1
    4 MAXLOGFILES 16
    5 MAXLOGMEMBERS 3
    6 MAXDATAFILES 100
    7 DATAFILE SIZE 300M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    8 EXTENT MANAGEMENT LOCAL
    9 SYSAUX DATAFILE SIZE 120M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    10 SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
    11 SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    12 CHARACTER SET AL32UTF8
    13 NATIONAL CHARACTER SET UTF8
    14 LOGFILE GROUP 1 SIZE 51200K,
    15 GROUP 2 SIZE 51200K,
    16 GROUP 3 SIZE 51200K
    17 USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
    CREATE DATABASE "NEONREL1"
    ERROR at line 1:
    ORA-01501: CREATE DATABASE failed
    ORA-00349: failure obtaining block size for '+DBLIVE1'
    ORA-01031: insufficient privileges
    Message was edited by:
    tjobbins

    Update: I've worked out the difference between the two sets of errors I get.
    The basic error is this:
    ORA-00200: control file could not be created
    ORA-00202: control file: '+DBLIVE1'
    ORA-17502: ksfdcre:4 Failed to create file +DBLIVE1
    ORA-15001: diskgroup "DBLIVE1" does not exist or is not mounted
    ORA-15055: Message 15055 not found; No message file for product=RDBMS, facility=ORA
    ORA-01031: insufficient privileges
    However if my init.ora contains the line:
    control_files=/opt/oracle/server/10.2.0/dbs/cntrlNEONREL1.dbf
    then I instead get the second error:
    CREATE DATABASE "NEONREL1"
    ERROR at line 1:
    ORA-01501: CREATE DATABASE failed
    ORA-00349: failure obtaining block size for '+DBLIVE1'
    ORA-01031: insufficient privileges
    So basically these must be the same error, just in the second case I'm not trying to put the control file on the ASM so it fails at a different point.
    But both errors must be because of the same cause, I suppose.

  • Can't create file using FM File_Get_Name

    Hi guru,
    I have a program that creates a file to the system using fm fiel_get_name. Someone changed the OS in the SY-OPSYS from AIX(Application) to NT(file server). But the file seems is not there.
    Is there something wrong from changing the SY-OPSYS?
    Points will be rewarded...Thank you

    Hi gurus,
    what else should I look at..i dont think there's nothin wrong about the code of my program.. It's about how it is deifne in the logical path and other settings... Would you know in what tcode can I see it? I only new in this kind of issue.
    Points will be given ..thanks!

  • I can't create form using dblink

    I have created a dblink (public) pointing to a table in the remote database. Also I have created some reports using this dblink and it works fine. The problem is that when I create a form based on table or view using this dblink, I get the error "page not found".
    Can anybody help me?
    Thanks!!

    You need to create the link in the public schema. I can't remember if you also have to create the form in the public schema though I don't think that is the case. Remember to grant public access to the link.

  • Can we create LOV using free hand sql with out hardcoding

    Hi gurus,
    Dear All,
    For some of the reporst we don't have universe, so we use to get the report with the help of free hand sql,
    but here I have to hardcode the list of values by using @prompt, but instead of hardcoding is there any ways to get the list of vaues  by using @prompt, if then can any one help me out.

    Yes and no.
    When we use a LOV in a universe, the SQL is generated from the object definition. With Free Hand SQL (FHS) there is no universe. However...
    If you create a very simple universe to host your LOV, and then reuse the same prompt text in your FHS then you can fake the LOV. This is not a great solution, but to be honest, FHS is never really a solution that I would consider. You might consider using Crystal to replace Deski in these cases.

  • Can i create program, using Adobe Illustrator SDK, which would understand *.ai file format (cs versi

    I need to write converter from cs ai files to my own format.
    Can i use Adobe Illustrator SDK for creating such a program?
    Is there in SDK libraries, which would be used for reading by program cs ai file format?
    Must Adobe Illustrator be installed for such a program would work?

    Well, if Idraw can do it you would need to figure out which format it likes (probably tiff would be my guess), save in that format and open the image there and proceed with however it works. The only useful advice I can offer is that jpg is a poor choice for any image that includes text. It will be fuzzy.

  • Can I create and use 2 PKCS11 Providers, each with different config?

    Here is the code I am running twice with different configFilePaths:
         setNssProvider(new SunPKCS11(getConfigFilePath()));
         Security.addProvider(nssProvider);
         Security.removeProvider("SunJSSE");
         Provider jsse = new com.sun.net.ssl.internal.ssl.Provider(nssProvider);
         Security.addProvider(jsse);
         keyStore = KeyStore.getInstance("PKCS11", nss);
         keyStore.load(null, ksParams.getKeyStorePassword().toCharArray());
    I am getting a ProviderException, presumable where I create the SunPKCS11 instance:
         ProviderException: Secmod directory c:\nss\fips2db invalid, NSS already initialized with c:\nss\fips1db
    Is it possible to run two PKCS11 Providers, with different configs, in the same address space?
    Thank you,
    Rob

    reefedjib wrote:
    Is there anyone else who could comment on my problem, here? I am really hoping that someone can point me to a solution.I realized I was using the same name in the config files. I changed it to be different and the same result is occurring.
    ProviderException: Secmod directory c:\nss\fips2db invalid, NSS already initialized with c:\nss\fips1dbHere are my two config files:
    name = NSSfips1
    nssLibraryDirectory = c:\nss\lib
    nssSecmodDirectory = c:\nss\fips1db
    nssModule = fips
    name = NSSfips2
    nssLibraryDirectory = c:\nss\lib
    nssSecmodDirectory = c:\nss\fips2db
    nssModule = fipsAny word on this?
    Thanks

Maybe you are looking for