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.

Similar Messages

  • Creating Sales Order in SAP from a web application database

    Hello All,
    I am trying to create a sales order from a web based package .Means a web based package is running in the system and the user will enter the sales order data in the web application and it gets saved in that database.
    Now i want to retrieve the data from that database and post sales order in SAP using batch processing .
    Can someone help me out how to do this ????
    Please provide some sample codes .
    Thanks,
    Amit

    Hi Amit,
    Using Ado.net you can retrive the data from database
    Refer This.....
    Link: [url] SAP B1 Web Application asp.net DI Server DI API
    Link: [url]   Method of using ADO.Net connect to SAP Company DB
    Thanks
    Shafi

  • What is the standard class used to create SALES ORDER in SAP CRM?

    Hello Experts,
    Can anyone suggest me what is the standard class used for creating sales order.
    I have created sales order using the BAPI 'BAPI_SLSTRANSACT_CREATEMULTI' in my report program.
    Now, I have to create sales order using standard classes and methods(my assignment).
    Please suggest the suitable class.
    Regards
    DNR Varma

    Hi Varma,
    You can create crm documents like sales order using BOL interfaces.
    You can check one example at the following thread:
    Create OrderThro BOL
    Check if it helps you a little more.
    Kind regards,
    Garcia

  • Issue in creating Sales Order in CRM 7.0 IC WEB

    Hello Experts,
    I am working on CRM7 and ECC 6 integration. I have configured Sales Order ( transaction type ZOR) in CRM. Using GUI the sales order is properly created in CRM and getting replicated to ECC without any issues.
    I started configuring IC web UI, systematically followed C04 and C78 and completed all the steps including IC_BT transaction profile customization but inspite of this I am unable to create sales order in IC web.
    I am geting error "No transaction type available for creating transactions" and if I go into details of this error it shows a page as follows
    Diagnosis
    No transaction type is available when creating a transaction. This can be due to the following reasons:
    u2022     No transaction type is available according to Customizing
    u2022     The user has no authorization for the transaction type
    System Response
    It is not possible to create the transaction.
    Procedure
    Make sure that:
    u2022     The transaction type is set up in Customizing
    u2022     The user has authorization for the transaction type
    I have checked everything , nothing seems to be wrong. Can anyone advice how to resolve this issue
    Thanks and Regards
    Ambar

    goto IMG where you defined the ZOR.  Select the ZOR and choose Channel on the left, is ICW Interaction Center Webclient a choice? or add it.
    We noticed that once any transaction was set to an option, we had to set these for all transactions in the ICWC, ISA, Gui, etc.

  • Creating Sales Order through SAP-EDI after PO

    Hi, Experts.
    Please help me to design business flow using SAP-EDI.
    How can I design business among 2 affiliate companies and HQ.
    are many company around the world, and they want to use SAP-EDI to realize intercompany process,
    such as below.
    1, Company A create Puchase Order from B
    2, Sales Order is created automatically at Company B
    I know it is possible If this is only among 2 companies.
    But my client want to put HQ in this flow by plan as below.
    1, Company A create Puchase Order. and in Puchase Order,
    Vender is HQ and Invoicing Party is HQ
    Goods supplier is Company B
    2, Sales Order is created automatically at Company B, and in Sales Order,
    Sold-to party is HQ and Bill-to party is HQ
    Ship-to party is Company A
    Be careful that A doesn't always purchase from B, so user should select where to purchase at each time.
    Is it possible to realize customizing or user-exit? If so, please tell me.

    wazukanahikari
    With regard to margins, you should be able to manage them using pricing conditions, you have the following in the standard any way:
    PI01 Intercompany: fixed amount per material unit
    PI02 Intercompany: percentage of the net invoice amount
    If the above don't work, you can create your own condition types to add the margin.
    I don't think you need to add on anything special, if you have an EDI specialist work with him/her. This is an ALE/EDI process that one company sends a PO Idoc and another company uses that Idoc to create a Sales order. Only difference is that both companies are in the same SAP client/instance.

  • BAPI BAPI_BUSPROCESSND_CREATEMULTI to create sales orders in SAP

    Hi
    How can i use this BAPI  "BAPI_BUSPROCESSND_CREATEMULTI." to create mulitple sales orders in CRM from external system. Can you throw some lignt on what will be import parameters ?
    Thanks,
    Vaishnavi

    HI,
    There is a similar requirement in the following thread just check for reference.
    Trying to create a sales order in CRM with BAPI_BUSPROCESSND_CREATEMULTI.
    Regards and Best wishes.

  • Function Module to retrieve ALL Sales Orders in SAP based from a UserStatus

    Can someone know a function module to give me a set of Sales Documents
    of a specifc type and a specific System Status.
    For example:
    CALL FUNCTION '?????'
        EXPORTING
            txt04    =    'INAC'    "specfic status text not the 'E0001' JEST-STAT value.
            inact    =    ' '           "for ACTIVE statuses only.
            auart    =    'ZMAG'   "specifc document type
        TABLES
            t_vbeln    = i_vbeln   "result is a list of sales orders based from criteria above
    I am thinking it is not as simple as the above. But 2 - 3 FMs will do.
    Note: I am not given a choice to SELECT from DB tables VBAK and JEST. They want pure FM calls only. Please reply ASAP.

    Hi,
    i dont think there is any FM as such ..
    but in VA05,,, u will get the all the information
    reward points if it is useful...
    thanks,
    Manjunath MS

  • Sales order to invoice ... using web service

    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 through ManageSalesOrder web service.
    Any feedback will be greatly appreciated!

    HI,
    I want full flow from selling of goods to till we get the money deposited in the bank.
    In that process a sales order, delivery, invoice documents should be involved.I guess all r that in SD module.
    Thats the core requirement and anyways there will be a gl a/c, customer and a bank will be involved in this process.
    I hope the query is much clearer
    Thanks
    Thurla

  • How to generate sales order in SAP using XI

    Hi,
    I have been assigned to generate sales order in SAP..data comming from legacy in XML file format. with the data received in XI. I need to generate sales order in SAP system,
    can any body help me wat will be the step by step solution of that.
    I am totally blank in ABAP. I dont know any thing in ABAP.
    Thanks sree manju.

    Hi Sree,
    As per your requirement, you can use a file adapter to read XML files and the pass the data to XI and from XI to R/3, you have 3 ways to create sales order in SAP:
    1. Idoc Adapter: Use a standard idoc to create sales order in SAP.
    2 RFC Adapter.
    3. Server Proxies: The transaction code for sales order creation is VA01. You will recieve the data in your server proxy method (EXECUTE_ASYNCHRONOUS) and then write a BDC code to upload this data into VA01 transaction.
    Knowing that you do not have experience in ABAP coding,  I would suggest you to go for Idoc adapter or RFC adapter (if standard BAPI is available).
    Otherwise, for using server proxies, the help of an experienced abaper is indeed required.

  • BAPI_SALESORDER_CREATEFROMDAT1 - using this to create Sales orders in R3

    Hi
       Does anyone out there - know the limitations of using this BAPI BAPI_SALESORDER_CREATEFROMDAT1 to create sales orders in R3 system - from a functional standpoint ? i.e any known issues - in terms of not being able to pass - all aspects of sales order data using the BAPI , any onscreen validations being done in VA01/VA02 not being done in the BAPI etc.
    Can this BAPI be used for sales order create/change ? Or is there any other BAPI out there that is better suited and more well rounded for sales order creation in R3 ?

    REPORT z_bapi_create_sales_order_test .
    * Order header:
    * - Order type: OR  Important you must use the german code TA
    * - Sales org: 1000
    * - Distrb. chan.: 10
    * - Division: 00
    * - Sold to party: 1032
    * - Ship to party: 1032
    * - Purch order: DG-19970626-3
    * Order item:
    * - Material: P-100
    * - Qty: 1
    DATA:
    * Order partners
    li_order_partners    TYPE STANDARD TABLE OF bapiparnr,
    l_order_partners     LIKE bapiparnr,
    * Structures for order header
    l_order_header_in    LIKE bapisdhd1,
    l_order_header_inx   LIKE bapisdhd1x,
    * Tables for order items
    li_order_items_in    TYPE STANDARD TABLE OF bapisditm,
    l_order_items_in     LIKE bapisditm,
    li_order_items_inx   TYPE STANDARD TABLE OF bapisditmx,
    l_order_items_inx    LIKE bapisditmx,
    * Return table from bapi call
    li_return TYPE STANDARD TABLE OF bapiret2,
    l_return  TYPE bapiret2,
    * Sales document number
      l_vbeln LIKE bapivbeln-vbeln,
    * Error flag
      l_errflag(1) TYPE c.
    START-OF-SELECTION.
    * Build partner information
      CLEAR l_order_partners.
      l_order_partners-partn_role = 'AG'.          "Remember German codes !
      l_order_partners-partn_numb = '0000001032'.
      APPEND l_order_partners TO li_order_partners.
    * Build order header
    * Update flag
      l_order_header_inx-updateflag = 'I'.
    * Sales document type
      l_order_header_in-doc_type    = 'TA'.        "Remember German codes !
      l_order_header_inx-doc_type   = 'X'.
    * Sales organization
      l_order_header_in-sales_org  = '1000'.
      l_order_header_inx-sales_org  = 'X'.
    * Distribution channel
      l_order_header_in-distr_chan = '10'.
      l_order_header_inx-distr_chan = 'X'.
    * Division
      l_order_header_in-division = '00'.
      l_order_header_inx-division = 'X'.
    * Purchase order
      l_order_header_in-purch_no_c = 'DG-19970626-300'.
      l_order_header_inx-purch_no_c = 'X'.
    * Build order item(s) - Only 1 is used in this example
      l_order_items_in-itm_number = '10'.
      l_order_items_inx-itm_number = '10'.
      l_order_items_in-material = 'P-100'.
      l_order_items_inx-material = 'X'.
      l_order_items_in-comp_quant = '1.000'.
      l_order_items_inx-comp_quant = 'X'.
      APPEND l_order_items_in TO li_order_items_in.
      l_order_items_inx-updateflag = 'I'.
      APPEND l_order_items_inx TO li_order_items_inx.
    * CALL Bapi
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
           EXPORTING
                order_header_in  = l_order_header_in
                order_header_inx = l_order_header_inx
                testrun          = 'X'
           IMPORTING
                salesdocument    = l_vbeln
           TABLES
                return           = li_return
                order_items_in   = li_order_items_in
                order_items_inx  = li_order_items_inx
                order_partners   = li_order_partners.
    END-OF-SELECTION.
    * Check and write Return table
      CLEAR l_errflag.
      WRITE: / 'Sales dcoument: ', l_vbeln.
      LOOP AT li_return INTO l_return.
        WRITE: / l_return-type, l_return-message(50).
        IF l_return-type = 'E'.
          l_errflag = 'X'.
        ENDIF.
      ENDLOOP.
    * No errors - Commit
      IF l_errflag  IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.

  • Create Sales Order through VB

    Hi Experts
              I am new to BAPI, my requirement is to create sales order in SAP through VB.
              Please provide me the BAPI coding part which are needed and also suggest me the steps to be followed in SAP and VB.
             Thanks in advance.
    Regards
    Rajaram

    Hi Vinodh
      I tried this coding as part of your link, but it contains Run-time error as Object Required.
          Anything needs to be added in my VB Project, i have already added the BAPI ActiveX contol in my project.
    Pls sugges me.
    Dim boOrder As Object 'Business object SalesOrder
    Dim oPartners As Object 'Parameter OrderPartners of BAPI method
    Dim oHeader As Object 'Parameter OrderHeaderIn of BAPI method
    Dim oItemsIn As Object 'Parameter OrderItemsIn of BAPI method
    Dim oReturn As Object 'Parameter Return of BAPI method
    Private Sub Form_Load()
    'Connect to business object SalesOrder
    '(this creates an anonymous object with an empty key field):
    Set boOrder = oBAPICtrl.GetSAPObject("SalesOrder")
    'Get structure/table objects:
    Set oPartners = oBAPICtrl.DimAs(boOrder, "CreateFromData", "OrderPartners")
    Set oHeader = oBAPICtrl.DimAs(boOrder, "CreateFromData", "OrderHeaderIn")
    Set oItemsIn = oBAPICtrl.DimAs(boOrder, "CreateFromData", "OrderItemsIn")
    'Fill header:
    oHeader.Value("DOC_TYPE") = "TA" 'Standard order
    oHeader.Value("SALES_ORG") = "0001" 'Sales organization
    oHeader.Value("DISTR_CHAN") = "01" 'Sales channel
    oHeader.Value("DIVISION") = "01" 'Division
    oHeader.Value("PO_NUMBER") = "" 'Customer purchase orderNumber
    oHeader.Value("PRICE_DATE") = Now 'Date
    'Fill partners:
    oPartners.Rows.Add
    oPartners.Value(1, "PARTN_ROLE") = "AG" 'PartnerRoll: Person posting the order
    oPartners.Value(1, "PARTN_NUMB") = "0000010096" 'Customer number
    'Fill items:
    oItemsIn.Rows.Add
    oItemsIn.Value(1, "REQ_QTY") = "0000000010000" 'Quantity
    oItemsIn.Value(1, "MATERIAL") = "BERLINER" 'Product ID
    oItemsIn.Value(1, "COND_VALUE") = "1432" 'Rate
    'Call the method:
    boOrder.CreateFromData OrderHeaderIn:=oHeader, _
    OrderPartners:=oPartners, _
    OrderItemsIn:=oItemsIn, _
    Return:=oReturn
    'Free the business objects:
    Set boOrder = Nothing
    End Sub
    Regards
    Rajaram

  • Error determining posting period(infostructure S008,Variant Z2,RC3) while creating Sales orders from Inbound IDOCS

    Hello,
    I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
    While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
    Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
    Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

    Thank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
    Could it be an issue with e Update rule in this Infostructire S008
    Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
    "Maintenance of SAP standard updates not allowed"
    Kindly advice
    Thanks and Regards
    Mohammed Roshan

  • Creating Sales Order with reference to Quotation from different Sales Area

    Hi,
    I would like to inform you that our customer (GE ENERGY OC) from Europe have a requirement where they want to create sales orders with reference to quotation that is from different sales area. Standard SAP functionality doesn't allow this feature, hence requesting your help to give me an update in this regard.
    Please treat this as urgent as they have to do business cutover where they are in the process of completing open sales orders.
    Thanks
    Ashfaq
    Mobile: +91-98857-07558
    E-Mail: [email protected]

    Hi RadhaKrishna,
    In standard system it is not possible to create sales order from a quotation whose sales are is different.
    However I think this is possible by using some user exit in sales order. I have never tried this.
    Regards
    srini

  • Create Sales order from Internal Purchase Order using IDOC

    Hello Friends,
    I have requirement to create Sales Order from Internal Purchase Order Using IDOC.
    Backgorund, we have already configured IDOC orders05 to create Sales Order from external Purchase order from Inbound IDOC, and it is working fine.
    Now we have new requirement to create Sales Order from our own Purchase order, i.e. When PO is created in one plant corresponidng sales order automatically must needs to create in another Plant with respect PO.
    I m trying to design a solution for above problem as follows,
    1.create an Inbound Idoc from PO, by creatiing one new message type on PO save.
    2.Process that Inbound  IDOC same as it is from external PO.
    3.Once processed Sales order will create.
    Please help me in step 1. to create Inbound IDOC from PO.
    If you want any further clarification please write me.
    Thanks,
    Mahesh

    I had done a similar scenario before and we achieved it through SAP XI. The problem is with the control record. When we create a ORDERS IDOC from a PO the control record will be for outbound transmission. We sent the file to XI and XI resent it back with some data parsing and a new inbound control record. This way it went neat outbound and inbound.
    I'm not sure what kind of architecture you have. If you have to do it within your ECC/R/3, then you could create the outbound IDOC to a new port and write a fresh RFC to pick it up from the same folder and create a new control record for inbound processing.
    I haven't tried this; but there is a "processing w. trigger (inbound)" option on the outbound process code. May be you can explore into that a bit more.
    I'm sure there could be better approaches to handle this within ECC so if you stumble on any, do write back. I would like to know to update my knowledge .

  • Problem in Creating Sales Order From One DB to another DB

    Hello All,
    I am trying to create a Sales Order in another database from the current database based on the Purchase Order but while creating the sales order system is throwing an error " In "To Whse" enter valid values [ZAPp 0] "
    My Code for Creating Sales Order in another DB are as follows :-
                 '==== Connect To another SAP Company ====='
                '=====================================
                Dim oCompany_DB As New SAPbobsCOM.Company
                oCompany_DB.Server = "OSL_SERVER"
                oCompany_DB.LicenseServer = "OSL_SERVER"
                oCompany_DB.UseTrusted = False
                oCompany_DB.CompanyDB = Database_Name
                oCompany_DB.UserName = SAPUserName
                oCompany_DB.Password = SAPPassword
                oCompany_DB.DbUserName = DBUserName
                oCompany_DB.DbPassword = DBPassword
                oCompany_DB.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
                lRetCode = oCompany_DB.Connect()
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
    '===== Creating the Sales Order ====='
    '================================
      Dim oOrder As SAPbobsCOM.Documents = oCompany_DB.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                Dim DocDueDate As String = oRecord.Fields.Item("DocDueDate").Value
                oOrder.DocDueDate = DocDueDate
                oOrder.CardCode = Customer
      While Not oRecord.EoF
                    Dim ItemCode As String = oRecord.Fields.Item("ItemCode").Value
                    Dim WhsCode As String = oRecord.Fields.Item("WhsCode").Value
                    Dim Quantity As Double = oRecord.Fields.Item("Quantity").Value
                    Dim Price As Double = oRecord.Fields.Item("Price").Value
                    Dim Discnt As Double = oRecord.Fields.Item("DiscPrcnt").Value
                    Dim TaxCode As String = oRecord.Fields.Item("TaxCode").Value
                    oOrder.Lines.ItemCode = ItemCode
                    oOrder.Lines.WarehouseCode = WhsCode
                    oOrder.Lines.Quantity = Quantity
                    oOrder.Lines.Price = Price
                    oOrder.Lines.DiscountPercent = Discnt
                    oOrder.Lines.TaxCode = TaxCode
                    oOrder.Lines.Add()
                    oRecord.MoveNext()
                End While
                lRetCode = oOrder.Add
                '=== Check For Error if any ===='
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
                oCompany_DB.Disconnect()
    When i execute the above code company gets connected but sales order not getting added in another company.
    Thanks,
    Amit

    You can not do it the alternate way Kevin suggests, direct DB inserts are prohibited by SAP and can corrupt your DB, particularly because unlike what most people think, all SAP documents affect more than just their own tables (e.g. the numbering table, the history tables).
    Are you getting any error message, or is it returning 0?
    If it is returning 0, then check is the document actually going to the newly created database or maybe somehow going to old one.
    If it isn't returning 0, what is the error code and message.
    Edit:
    Also I do see an error in your code. As it stands, you are adding an empty line to the end of every order. This can cause problems for SAP.
    Dim counter As Integer = 0
    If counter <> 0 Then 'Not equals 0, forum hides lt & gt symbols.
    oOrder.Lines.Add()
    End If
    counter = counter + 1
    oOrder.Lines.ItemCode = ItemCode
    oOrder.Lines.WarehouseCode = WhsCode
    oOrder.Lines.Quantity = Quantity
    oOrder.Lines.Price = Price
    oOrder.Lines.DiscountPercent = Discnt
    oOrder.Lines.TaxCode = TaxCode
    Edited by: njmog1 on May 9, 2011 10:14 AM

Maybe you are looking for