Create Sales Order via Web Service

Hello All,
I am trying to create a standard sales order using a Web Service and having some problems. 
I am using BAPI_SALESORDER_CREATEFROMDAT2 and it is working EXCEPT that it needs to be followed immediately by a BAPI_TRANSACTION_COMMIT for the sales order to be saved in the database. 
There doesn't seem to be any session state being saved between my first request and my second so the COMMIT doesn't work. 
Can anybody tell me how session state is maintained in Web Services on the NetWeaver platform? 
Or is there another SOA service that will do the COMMIT as part of its operation?
Any help would be GREATLY appreciated!
Thanks

Hi Randy,
If you install the SAP ERP ES (enterprise service pack), you will get a ready list of standard list of enterprise services. Out of these, the enterprise services for creating/editing sales order are also there. To check out, please go to the Enterprise Service Workplace https://www.sdn.sap.com/irj/sdn/esworkplace and check the Ent. Services at http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=7AB0BCC20B1611DA1503000BCDDC2565&fragID=&packageid=DBBB6D8AA3B382F191E0000F20F64781&context=&iv=
Regards
Nilay

Similar Messages

  • Documentation on Creating Sales Order using Web Services

    hi,
    I can goto ESA Preview system using SAPGUI and create a sales order (using va01 transaction).
    I tried to do the similar thing using the WebService (Create Sales order), but have lots of problems.
    ->Fields used in WebServices are not in sync with what would be if you use the GUI. (example u enter sales region, buyer id, ship address and the items for a standard sales order.
    ->There is not much documentation on what the fields in the webservice mean. (e.g. what is the difference between BuyerParty and BuyerInternalId? )
    ->There are no sample combination of values that work. (Belive me it would take hours to figure out right combination of values needed..)
    Any hints would be appreciated
    Kiran
    http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=138ABFEEA8A34999BFCEB31537EC8D65&fragID=&packageid=CBD4F2B708B8144DAEA05442D8FD491E&context=&iv=
    http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=5640EE01E71B11DAB5240007E9102256&fragID=&packageid=CBD4F2B708B8144DAEA05442D8FD491E&iv=

    Hi...
    you can use Adaptive RFC methodology in web dynpro java to work with BAPIs..... these are standard bapi's provided
    Here are required Bapis... select which one you want....
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    check this thread SALES ORDER creation using BAPI
    sample java program which will call SAP bapi function sales order create
    PradeeP

  • Creating sales order using web dynpro JAVA

    Hello everyone,
    i am new to web dynpro. Can any one tell me how to creating sales order by web dynpro JAVA using BAPI.
    Thanks.
    Vinita Sharma

    Hi...
    you can use Adaptive RFC methodology in web dynpro java to work with BAPIs..... these are standard bapi's provided
    Here are required Bapis... select which one you want....
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    check this thread SALES ORDER creation using BAPI
    sample java program which will call SAP bapi function sales order create
    PradeeP

  • Error creating sales order via Interaction Center

    While creating a sales order via Interaction Center, I am getting an error "Error while creating member activity for order 5129793", as a result the points are not getting accrued for the account.
    Can anyone please help? I am very new to this
    Regards,
    Harsh

    Hi,
    Check the partner determination profile in spro for this activity. Try to use a standard profile and see what happens.
    Best regards,
    Caíque Escaler

  • How to change the status of material while creating sales order via BDC

    Hai.
    In BDC while creating sales order( va01 posting ) it is stucking up in middle saying material is new. I.e Sales order (va01) is not  getting created because  of material status is new . I want to create sales order  (va01) even  material status is new.
    pls give me out the solution. Points will be rewarded.
    thanks & regards,
    sami.

    Hi,
    If you drag the line item a little towards the right side, you will find a filed material entered. The one you see in the material filed on sales order over view screen is the one determined. You can as well double click and see the fields material entered and material determined.
    Is there anything else you are expecting to see as part of analysis ?
    Regards
    Sadhu Kishore

  • Creating Sales Order from WEB Dynpro

    Background:
    My client has the requirement to front end SAP Sales Order Create with a WEB Dynpro screen.
    This WEB Dynpro screen is used to enter minimum data required to create a sales order, plus custom VBAP fields, (added to VBAP using append structure).
    I am using BAPI_SALESDOCU_CREATEFROMDATA2 to create the sales order.  All is working fine.
    New Requirement:
    Client now has an additional requirement to calculate Net Value (VBAK-NETWR and VBAP-NETWR) based on item conditions and a custom item field VBAP-ZZUSE.  I have all the data I need to calculate custom Net Value (VBAK-NETWR and VBAP-NETWR), however these fields are is not available in BAPI_SALESORDER_CREATEFROMDAT2, structure BAPISDH1 or structure BAPISDITM.
    Question:
    Does anyone have any suggestions?  I have searched for a different BAPI where NETWR is available, but can find none.  An option I am considering is to code a custom BAPI that uses RV_SAPES_DOCUMENT_UPDATE where both VBAK and VBAP are available, just to update NETWR.  This function is used during execution of VA01.
    Any other suggestions or ideas?

    Additional Information:
    My client is a services based client.
    For example a material represents a service (drilling) this material is priced at value per day.  Number of days is stored in VBAP as a custom field ZZUSE.  The requirement is to use existing condition and ZZUSE (number of days 1 - 99) to calculate Net Value and update VBAK-NETWR and VBAP-NETWR based on condition and ZZUSE. 
    I can not allow BAPI_SALESORDER_CREATEFROMDAT2 to calculate VBAK-NETWR and VBAP-NETWR based only on conditions.
    Does this clarify my requirement?  Do you have any suggestions?

  • Release Sales Order from web service

    Hi Team,
    I have been trying to use the relase action in the ManageSalesOrder web service to no avail.  Everytime I use the xml to SOAPUI to send the request with sales order id, it kicks back saying not authorized.
    I am using the ManageSalesOrder to do multiple other things through SOAPUI, this one seems to be the only stickler.
    1. I can create the sales order just fine.
    2. I can set the price of the item
    3. Various other things.
    Any thoughts would be greatly appreciated!!

    That was great insight and worked great!
    I am trying to take the released sales order all the way to invoice.
    Sales Order > Release >  Delivery Propsal > Release > Invoice Request
    Once I am at Invoice Request the status of my sales order (invoice) is "Processed" when it should be "To Be invoiced"
    I am not clear on this:
    When I am at Work Center : OutBound Logistics > Delivery Control: Delivery Proposal
    How and which web service do I use to "Post Goods Issue"(in the GUI when "Post Goods Issue" button is clicked it requires you to fill out "Actual Quantity").
    In this screen shot:
    the first item was create through the GUI use the Devlivery Propsal "Post Goods Issue" button.
    the second item was created throug ManageSalesOrder web service.
    Any feedback will be greatly appreciated!

  • Creating Sales Order using Web Dynpro for java

    Hi SDN,
    I am new to Web Dynpro for java. I have developed an application for creating a sales order using adaptive RFC Model using BAPI. It's working fine when i create a single order. I wanna create SO with more than one line item. I have used the Table UI Element to do so. But i could not able to enter the 2nd item details. Please suggest me how to pass more than one line item from the Table UI element.
    Thanks in advance.
    Regards,
    Basha

    Hi Basha,
    Do you need to display the header items and detailed items?
    If the BAPI Contains Output values in R/3 side.
    I mean to say if BAPI  contains 4 line items.u can get thru wdjava the followinf way.
    1. Create webdynpro application.
    2.Import the model.
    3.Create Customcontroller and model binding .
    4. Write the execute method in controller.
      BAPI b = new BAPI();
      WdContext.node<BAPI>.bind(b);
       give inputs for BAPI
    b.setname(" ");
    b.setno("");
    wdContext.currentBAPI().modelObejet().execute();
    wdContext.node<output>.invalidate(); in try catch
    5. create view or when u give the dynpro application its
    in the add custom to view and drag BAPI custom to view .
    6.Crete UI for ur table thru insertTemplate table directly mapp the  output values.
    7. deploy and run
    U can get the out line items .
    Or any thing else post ur requirement.
    Thanks
    Lohi

  • Creating a sales order via lsmw.

    Hi,
    I am creating sales orders via lsmw. Each of these sales orders may contain any number of line items, i.e. sales order 1 might have 3 line items and the next sales order may have 10.
    How do I cater for this in lsmw. Is there a way of saying: when last line item, then start next sales order record?
    Any help appreciated.
    Regards,
    Warren.

    HI, I create LSMW for sales order. It is working fine for 9 line items. IF more than 9 line item, other item  is not updating. Pls provide me a solution. Thanks in Advance.
    my email is [email protected]

  • Problem in creating Sales Order

    Hi All,
    We have 3 Document types ZS01,ZS02 and ZS03 for creating <b>Sales Order</b>. We have written one program to create Sales Order for document type 'ZS01'.
    Our requirement is ,we should allow to create sales order of doc.type ZS01 <b>thru that 'z' program only</b>,we should not use ZS01 type to create sales order via VA01.So, we have restricted sales order creation using 'ZS01' thr' VA01 by authorisation profile.So in my 'z' program i couldn't call VA01 to create sales order.So I tried using BAPI,it is giving me the error <b>"No maintenance authorization for document type ZS01".</b>
    Please guide or suggest me some alternative method to create sales order.
    Thanks & Regards,
    Sudipto.

    Hi Sudipto,
    There is no direct method of by passing a role, but u can try creating sales order thru  FM BAPI_SALESORDER_CREATEFROMDAT2 with reference to a SO that is already created with ZSO1, or you might call the Z report program internally from ur program to create the SO. 
    Hope that helps
    Anirban

  • How to add freight in sales order via DI ?

    Hi,
    Does anyone know how I can set the freight value when I try to create sales order via DI. I checked SDK help, there is fields like BaseAmountSC. But it is read-only in DI.  And I also found there is a table called RDR3, it says it is about freight in sales order but how I can access it in DI? Any suggestion?
    Thanks a lot !
    Lan

    Hi Gordon,
    Thanks for your reply. I think we have setup the code in SAP B1 because when I click the arrow button beside freight label in SAP B1, it will pop up a screen which I can type freight. But my question is how I can set the freight in DI? Which object in DI level refers to freight and how I can link this object to sales order document?
    Thanks,
    Lan

  • Creating Sales Order for "Payer" thru VA01 trans.

    Dear All,
    In our project, we have stations which r  <b>Sold-to-party</b> and <b>Credit customers</b> which is a <b>Payer</b>.
    We have to create <b>Sales order</b> for both <b>Stations</b> and <b>Credit customers</b>. Creating Sales order for Station is not a problem but each station has many credit customers, which are maintained in the Station.
    When we are creating Sales Order via <b>VA01</b> for a particular credit customer, we are entering Station as a sold-to-party and it asks for Payer which is the Credit customer for that station.<b>But when we are recording through SHDB transaction it is not asking for payer(credit customer for that station).</b>
    Please let me know  of BAPI or some other method to create sales order for credit customer(Payer). 
    Kindly help at the earliest.
    Thanks and Regards,
    Sudipto.

    Hi,
    There is TABLES parameter where you can pass the PARTNERS information. I am not sure of the parameter name but it would refer to something like BAPIPAR.
    Regards,
    Ravi
    Note : Please mark all the helpful answers.

  • Issue in creating sales order using process_header API (web service)

    Hi All,
    I am trying to create sales order header using web service call to OE_ORDER_PUB.Process_header API.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Is there any commit missing? Pls help me resolve this issue.
    Thanks,
    Vinoth

    Hi All,
    I am trying to create sales order header using web service call to OE_ORDER_PUB.Process_header API.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Is there any commit missing? Pls help me resolve this issue.
    Thanks,
    Vinoth

  • Web Service for "Creating Sales Order" by using BAPI

    Hello All,
    I am trying to create a WS for "Creating Sales Order". The corresponding BAPI that I am using for this purpose is BAPI_SALESORDER_CREATEFROMDAT1. I am able to create the Web Service and run the WSDL on WS Navigator.
    But there is a problem whil executing the Web Service. In the interface of WS, we can only enter item level details of "Order Partner". So when I enter the details and click on Execute, it returns me an error message "Please enter Ship to Party and Sold to Party". I have already given these details.
    Does any one have any idea of what is going wrong?
    Regards,
    Abhishek

    As you suggested i have passed the suggested parameters in item level..But this time i was not ablet to create the SO also..earlier i am able to creat SO but not line item, But now ia m not able to creat salesdocuement also.
    Return talbe filled with belwo messages.
    S V4                   233 SALES_HEADER_IN has been processed successfully   
    E V1                   320 No item category available (Table T184 ZKB  TEXT )
    E V4                   248 Error in SALES_ITEM_IN 000000                     
    W V1                   555 The sales document is not yet complete: Edit data 
    E V4                   219 Sales document  was not changed

  • Creating Sales Order in SAP B1 From a Web Service ????

    Hello All,
    I want to know whether we can create a Sales Order in SAP B1  using a Web Service .
    Will i be able to use the DI COM Objects with that web service for Creating Sales Order ???
    Thanks & Regards
    Amit

    The SDK help file & samples give good examples on how to use the DI Server to connect to the company and create documents.
    For example, this is the help files section on connecting to the company:
    Request
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Body>
        <dis:Login xmlns:dis="http://www.sap.com/SBO/DIS">
          <DatabaseServer>p5053655</DatabaseServer>
          <DatabaseName>SBODemo_US</DatabaseName>
          <DatabaseType>dst_MSSQL</DatabaseType>
          <DatabaseUsername>sa</DatabaseUsername>
          <DatabasePassword></DatabasePassword>
          <CompanyUsername>manager</CompanyUsername>
          <CompanyPassword>manager</CompanyPassword>
          <Language>ln_English</Language>
          <LicenseServer>ILTLVH25</LicenseServer>
        </dis:Login>
      </env:Body>
    </env:Envelope>
    Response
    <?xml version="1.0"?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Body><dis:LoginResponse xmlns:dis="http://www.sap.com/SBO/DIS">
        <SessionID>0A0E086D-2926-ED9C-DF42-4060B4072B12</SessionID>
        </dis:LoginResponse>
      </env:Body>
    </env:Envelope>
    It also has specific examples on how to add and update documents.

Maybe you are looking for

  • Compressor 4.1 waiting....

    I've had the WORST luck using compressor 4.x of ANY Apple software since I started with my first Mac in 1987. Compressor repair has let me get the occassional job through on my old machine, but this version (4.1) has me livid. I'm on a late 2013 rMBP

  • First photo in event has wrong place

    When you assign a place to an entire event, the first photo of the event will retain the LAST place assigned at a prior time. If you open up the event and click on a photo you will see the wrong place flash on the into window and then settle back to

  • URGENT: IllegalBlockSizeException Please Help

    Hi I am using DES/ECB/PKCS5Padding to generate a key. I am storing the key in a file. I am using the key to encrypt the password, which I store in a password field (size: varchar(128) in Oracle). When I decrypt the password at the time of login (usin

  • Workflow approval

    Hi, I have PO workflow approval here. Mail triggered in SAP inbox, now the user approved it. After approving the mail got disappeared , now how I can unapprove this? Please advice. Thanks

  • Nokia 5800 email application

    dear, ive recently reseted my nokia 5800 and deleted everything..including my email applic.tion-not the one found under mesage settinp but found on application. How can i download it as all that ive downloaded deducts my data bundle bt when i open th