How to created sales order through xi in CRM...?

Hi
My scenario is like this
I have one purchase order web application. when i click submit request will go to xi throgh http request. After it receiving the request xi will take the purchase order and based on the purchase order it will create a sales order in CRM through IDOC adpater and send the purchase order reference no back to customer.
How to do this scenario can any one please help me.
Best Regards
Deepika
null

You could use BPM to do this.
Try these how to guides :
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40697f5e-088d-2910-6592-cefedf19860e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e7bc3a5a-0501-0010-1095-eb47159e169c
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59ef6011-0d01-0010-bfb0-b51381e00509

Similar Messages

  • How to create sales order Automatically with reference to contract?

    how to create sales order automatically through batch or online? can anyone please suggest what needs to be change in SAPMV45A program?

    Hi,
    Wt am able to understand from the above question is, you want to create automatic sales order against contract on a day to day basis by doing batch program, hope am wright.
    See you can do it in two ways.
    1. By using BDC, in SHDB T code record how exactly you will do transaction and then give it to your abaper rest he will do. he will write a program and he will schedule that program every day night.
    2. By using BAPI. Just check in there are many threads are there which gives sales order bapi. Tell your abaper to map that bapi and tell them to schedule back ground job.
    Hope this will help out in solving your problem.
    Regards,
    Nagesh

  • How to create sale order step by step

    Hi all,
    I am new in SAP SD and how to create sale order. Please give step by step guid for this please.
    Thanks,
    Suresh.

    Please go through the forum rules.  First you have to search the forum to find answers to your queries.  If it is not there, then you can very well post the same.
    thanks
    G. Lakshmipathi

  • Creating sales order through Bapi

    Hi all,
    I am trying to create sales order through bapi.
    Now my problem is mapping sales order fields with bapi structure fields.
    1.'Overall Order status' field in the 'Status' tab of the header in VA02.
    2.'Tax'feild in the 'conditions' tab of the header in VA02.
    Please help me to map these fields into Bapi structure.
    Thanks in advance.
    Regards,
    Shalem.

    HI
    GOOD
    GO THROUGH THIS LINK,I HOPE THIS WILL GIVE YOU THE COMPLETE IDETA OF CREATING A SALES ORDER THROUGH BAPI,
    http://help.sap.com/saphelp_nw04/helpdata/en/4c/fd7ebb515911d395f900a0c94260a5/content.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    THANKS
    MRUTYUN

  • How to create sales order using bapi( test purpose)

    Hi all,
           while i was creating sales order using the BAPI_SALESORDER_CREATEFROMDAT1 it is giving some error,
    version 0 is not defined for the fiscal year ****.
    I have given the fallowing parameters as input
    ORDER_HEADER_IN
         DOC_TYPE     OR
                    SALES_ORG  1000
         DISTR_CHAN  10
                    DIVISION         00
    ORDER_PATNERS
         PARTN_ROLE     SP
         PARTN_NUMB     1000
    ORDER_ITEMSIN
         MATERIAL     M-13
    I need to create sample sales order . Please help me how to create sales order with an example( for test purpose).
    Regards
    Deviprasad.

    Hi Prasad,
    Try using BAPI_SALESORDER_CREATEFROMDAT2.
    While creating sales order using FM: BAPI_SALESORDER_CREATEFROMDAT2, please make sure ORDER_ITEMS_IN, ORDER_ITEMS_INX, ORDER_SCHEDULES_IN, ORDER_SCHEDULES_INX.
    Pricing Conditions will not be mandatory to create a sales order via BAPI.
    As you were saying, you can create a sales order but not with items. Do populate the internal tables that i have specified above.
    Also try to pass the item number internally, this will help you in identifying the schedule lines.
    Regards,
    Priyanka.

  • How to create sales order using BAPI.

    Hi all,
    I am trying to create sales order using standard BAPI
    "BAPI_SALESORDER_CREATEFROMDAT2". But, even I had entered all mandatory fields, I am unable to create sales order sucessfully.
    I had gone through the documentaion of this BAPI and entered these fields.
    These are the mandatory fields that which I had tried to create,
    ORDER_HEADER_IN :
    DOC_TYPE Sales document type
    SALES_ORG Sales organization
    DISTR_CHAN Distribution channel
    DIVISION Division
    ORDER_PARTNERS..:
    PARTN_ROLE Partner role, SP sold-to party
    PARTN_NUMB Customer number
    ORDER_ITEMS_IN..:
    MATERIAL Material number
    Do we have anymore fields to give as inputs? I am getting this error message as below :
    Msg: Personal number 00007176 does not exit.
    But, I am not giving any personal number manually. This personal number was having connection with partner role field,
    I had reffered this from the VBPA (Sales Document: Partner Table). Now, please suggest me how to solve this?
    Can anyone tell me how to solve this problem and create sales order sucessfully.
    Thanks in advance,
    Surender Batlanki.

    hi surendra ,
    chech with below code.
    REPORT z_bapi_salesorder_create.
    Parameters
    Sales document type
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Data declarations.
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                             WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                             WITH HEADER LINE.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
      Fill schedule lines
      lt_schedules_in-itm_number = '000010'.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = p_menge.
      APPEND lt_schedules_in.
      Fill schedule line flags
      lt_schedules_inx-itm_number  = '000010'.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'X'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    Call the BAPI to create the sales order.
      CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = v_vbeln
           TABLES
                return              = return
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_partners      = partner.
    Check the return table.
      LOOP AT return WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    Commit the work.
        COMMIT WORK AND WAIT.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    let us know if you have any qauistions.
    ~linganna

  • Create Sales Order through OE_ORDER_PUB  API and get credit card authorizat

    Hi,
    I was trying to know if there is some way to get credit card authorization (when payment type is CREDIT CARD) creating a Sales Order through de OE_ORDER_PUB API.
    I need to reproduce the manual process where you get this authorization, through the Action Button, in the Sales Order Window.
    Thanks in Advance.
    Nicolas.

    Hi Nagamohan,
    Thanks for the reply..It was Vision Instance that i was working on..
    There was some problem in setups. I had run the same script on other instance and it is working.
    Before signing off i have one more doubt...
    The script which i used is creating a sales order with booked_flag='Y' but flow_status_code is still 'ENTERED'
    how can i change it to 'BOOKED' using API...
    Thanks for the help...

  • Error while creating Sales Order Through BAPI

    Hi Friends,
      i am creating a RFC where i have to create sales order .
    I am using bapi
    BAPI_SALESORDER_CREATEFROMDAT2
    for same and entering values to it.
    I got the following return messages:
    S V4                   233 SALES_HEADER_IN has been processed successfully
    S V4                   233 SALES_ITEM_IN has been processed successfully
    S V1                   311 BDN Order 3112800903 has been saved
    But when I go to transaction VA03 and enter the number i get the following error:
    SD document 3112800903 is not in the database or has been archived
    Can any one know how to resolve this error.I am also using BAPI_TRANSACTION_COMMIT with wait = 'X'.
    Regards,
    Santosh Alle

    Hi,
    Try to check the return message once.
    SD document 3112800903 is not in the database or has been archived
    You will get this message if the sales document is deleted from the database .The BAPI   'BAPI_SALESORDER_CHANGE'  is used to delete salesorder.Check whether anyone has deleted it
    Also, sometimes it may take few seconds to update the sales order in the database when using BAPI. Check the transaction after some time.
    Regards,
    Lakshman.
    Edited by: Lakshman N on May 14, 2010 7:43 AM

  • How to create sales order with configuration?

    Hi, all!
    I'm trying to create sales order with multi-level BOM's explosion using BAPI_SALESORDER_CREATEFROMDAT2, but with no success.
    Scanning and following ton's of OSS notes and already posted answers in this forum regarding configuration in sales order doesn't lead to success to.
    So can anybody throw light on rules for populating data structures for items and items configuration in case of multi-level BOM's explosion in sales order? Providing working code snippet would be great.
    Regards,
    Maxim.

    Hi, all!
    Just want to properly close the thread and share experience gained.
    The main reason of error was in incorrect TABLES parameters populating for sales order items and their configuration.
    Not the secret that there is a lack of documentation for even BAPIs FM, especially for comprehensive things to do. And it seems that the right way to resolve proper structure of import/tables parameters for "creation/change" function modules is to call "corresponding read-FM" for object created on-line  and see how return parameters are populated.
    For example, for BAPI_SALESORDER_CREATEFROMDAT2 such corresponding FM is BAPISDORDER_GETDETAILEDLIST, which returns near the same structures.
    Actually in my case such algorithm was used in the first place. But BAPISDORDER_GETDETAILEDLIST returned wrong parameters as was discovered later This error was fixed by implementing OSS note 821191 and sales order was succesfully created.
    And I want to thank SAP Support experts in effective assistance. 10 points are yours!
    Regards,
    Maxim.

  • Problem In Creating Sales Order Through DI API

    Hi
    I am Creating The Sales Order Through DI API.
    the Error Is Coming - " [OACT] , 'No matching records found (ODBC -2028)'"
    anyone  can help me solving it.

    Hi vivek,
    Have you tried adding the same document with the client ?
    OACT is the accounts table and this error message typically indicates that there is an account parameter missing somewhere in the system.
    Possible causes include:
    - you are using a tax group or warehouse which does not have all the required accounts set
    - There is a price rounding and the rounding price account has not been set in the account settings
    - etc.
    The first things I would check include the tax group settings and the G/L Account determination settings.
    Henry

  • How to create Sales orders with external id ?

    Hi Experts,
       I wanna write a program to create Sales Order with external id via function muodule 'CRM_ORDER_MAINTAIN' and 'CRM_ORDER_SAVE'.But i don't know how to do and do any body tried it.The key issue is that how to use external id which is supplied by ourself rather than internal id supplied by system.
    Thanks for all.

    Hi,
    If you have already set the number range as an external range.
    Then just passing the transaction type to field 'process_type' and external id to field 'object_id' of table ct_orderadm_h. Sales order will created with the assigned external id.
    Hope this help.
    cheers,

  • ITem category  error while creating sales order through

    Hi,
    I am trying to create a sales order through Bapi  and in between im getting the below error.
    ' Item category TAM is not defined for non material items'.
    Can anybody pls provide the solution for this.
    Thanks

    speak to your SD functional person.  The Error is pretty self explanatory; SAP is telling you that the item category for that order item is not permitted by your SD configuration.

  • 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

  • Create Sales order through PO by output type NEU

    Hi friends,
    I want to create Sales order out of a PO. I used the output type NEU of PO and was successfully get ourbound IDOC posted. But my inbound failed.
    Two erros message:
    1.The material number for item 000010 could not be identified
    2. Partner number XX01 for customer XX01 , partner function WE does not exist
    Although I can manually create the sales order with exact same info.
    I used message type ORDERS04 for both partners and use ALE as a transmition.
    Thanks in advance!

    hi ,
    Can you please tell me it for the same company code or different company code.
    maintain the customer material info record , if it is a different company code. the system is checking the qualifier.
    thanks
    Kuntla

  • Creating sales order through BAPI - do not want to send idoc confirmation

    Hi guys!
    I'm creating a sales order using BAPI BAPI_SALESORDER_CREATEFROMDAT1. The system was cuztomized to send an idoc through an output type, so whenever this BAPI is executed an idoc is sent.
    My problem is that I do not want the Idoc to be created when using this BAPI.
    Is there a way not to use an output type when using the BAPI?
    Thanks in advance for your help!

    Use an output requirement that stops the proposal of the output.  You'll want to make sure that it works in both immediate and delayed modes, e.g., you can't use a field-symbol (or the KOMKBV1 user exit) for access to T180-TCODE or to the CALL_BAPI value in memory.   You might want to try the VBAK-ERNAM value, since you probably use a specific (non-dialog) user for the call.  Otherwise, use another field to identify a BAPI call and check that field in the requirement.

Maybe you are looking for