Create Sales order from a Purchase order through IDOCs in the same system

Hi,
I have been trying to create Sales ordes in the same SAP system, through the Purchase order generated.
The Purchase order generated, passes the information through an outbound I DOC to a SO inbound I doc, I am getting the following error
Partner number A2815 for customer 2815 , partner function WE does not exist.
Message no. VG140
but in my case the ship to party (partner function WE) is the same as Sold to party (partner function AG)
can any body please help how to map it
Sreeram P

Hello Sreeram ,
See note 1339290, which corrects the parameters of error message VG140.
Also, the sold to party (SP) is determined in several ways:
1. If the sender partner in the control record is a logical system (LS), an E1EDKA1 segment with the SP must be sent.
           E1EDKA1-PARVW = AG
           E1EDKA1-PARTN = valid partner in the receiving system
Otherwise the system takes the partner number from the control record into the field E1EDKA1-PARTN and this is not a valid partner.
2. If the sender partner in the control record is a SP, we take this SP from the sender partner into the sold-to party number. Excepted another SP was sent in the segment E1EDKA1-PARNR, then the SP from the control record has no effect.
The E1EDKA1 segment for the SP should be sent always before the E1EDKA1 segment of the ship-to party (SH).
Regards,

Similar Messages

  • How to send sales order through xi to the target system

    Hi Friends,
    i want the help to do the scenario.
    I need to send some salesorders, purchase orders which are created in R/3 I need to send those from ECC to some other system (non sap).
    what will be the scenario
    will any of u help me out?
    Thanks & Regards,
    Kalyani..

    Hi,
    You Can Go for RFC-XI--File Scenario OR  IDOC -XIFile Scenario OR  ABAP ProxyXI----File Scenario
    Please let me know if u have any doubts
    Regards
    Sesh

  • 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

  • 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

  • ERROR IN CREATING SALES ORDER,USING IDOC TYPE ORDERS05

    I am using exit to write my code for creating sales order of IDOC Type ORDERS05 and order type ZDRX.
    IF I proceess the Idoc in background each time error message comes
    FIELD kuwev-kunnr(ship to party)is not an input field.
    but if i run in foreground in debugging mode,sales order is getting created..
    please suggest something.

    If thats not working..
    try BAPI_SALESORDER_CREATEFROMDAT2
    If BAPI is not working. try creating a bdc for the same if there's not error on trying from VA01

  • 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 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

  • 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 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...

  • 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

  • Dates fields issue in the sales orders through IDOC

    Hi all,
    I'm trying to create a sales order through Inbound IDOC using IDOC_INPUT_ORDERS.
    I have 2 custom fields in the sales order which are date fields.
    I'm populating them from the IDOC segments(using E1EDKT1-tdid, E1EDKT2-tdline) in the user-exit just before the call trasacation statement. These dates are not coming for a few orders... but are getting populated normally for few of them.
    But the tricky part is that... if I process the same IDOC for the second time.. the order created is having the dates.
    My issue is that.. i need all the orders to be populated with the dates which IDOC have.
    Could anyone please help me with this issue.
    All the answers/replies are highly appreciated!!
    Thanks for you help!

    hi,
    the following may be of help
    There are 2 major exceptions to the batch input internal table. All text data from the segments E1EDKT1/2 and E1EDPT1/2 are not part of the batch input session. Text elements from these segments are posted directly to the data base AFTER the sales order has been created (please note: in order that item texts are posted correctly to the sales order the field POSEX from segment E1EDP01 MUST be transmitted). Also, configurable material information from the IDOC is exported to a global memory and therefore will not be part of the batch input session. Configurable material data is performed in Form CHECK_CONFIGURATION and the data is exported to global memory in the following code:
    Exportiert IDOC Daten ins globale Memory     
    export IDOC data to global memory            
      call function 'CUXC_IDOC_TO_MEMORY'          
           tables                                  
                cfg_instref = xe1curef             
                cfg_ref     = xe1cucfg             
                inst        = xe1cuins             
                part_of     = xe1cuprt             
                value       = xe1cuval             
           exceptions                              
                error       = 1                    
                others      = 2.                   
    One extra piece of useful infomartion if you wish to debug the process is to set your breakpoints at the following points
    for Function module IDOC_INPUT_ORDERS
    include LVEDAF0F..
      CALL TRANSACTION 'VA01' USING bdcdata
                                MODE  input_method
                                UPDATE 'S'
                                MESSAGES INTO xbdcmsgcoll.
    Now input_method is A foreground process and N for background processing but try changing it to P (pass through mode)
    If you have breakpoints in va01, e.g. MV45AF0B_BELEG_SICHERN,(the part where the sales document is saved)
    they will be hit, e.g
    perform userexit_save_document_prepare.
    perform userexit_save_document.
    Lastly, don't forget using program SDJEDI , see note 380603 for more information on this
    Hope this is useful
    Paul Quinn

  • Creating sales order using IDOC - Delivery hour

    Hi,
    i've a problem to solve. when creating a sales order i need that when the segment is E1EDK03 and the IDDAT is 002 i need to extract the delivery hour and insert it in the table vbak-vzeit, now what i'm doing in the exit EXIT_SAPLVEDA_001 is:
    DATA: hour LIKE vbak-vzeit.
    CHECK segment-segnam = 'E1EDK03'.
    IF segment-sdata(3) = '002'.
      hour = segment-sdata+11(6).
    ENDIF.
    and now i want to acess the value in hour in the exit EXIT_SAPLVEDA_002 to put it in the dxvbak struct tha i think that is the table correct to then internaly fill the vbak. the problem is that the variable hour is not available in the exit EXIT_SAPLVEDA_002. i do i do to pass the value that i want from the exit EXIT_SAPLVEDA_001  to be available in exit EXIT_SAPLVEDA_002  and then insert that value in the right place to fill vbak.

    Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved.
    Please let me know if u can help me, i wanted to do it using idoc
    Regards
    Sanju

  • Problem creating sales order using IDoc ORDERS05 (Inbound)

    Hello Experts,
    We are trying to create a sales order using the IDoc ORDERS05 with process code ORDE for creating sales order. I am getting the following error "VKORG, VTWEG, SPART cannot be determined for customer 0000006000 , vendor
    Diagnosis
    No sales organization, distribution channel or division were sent to the IDOC. This data is necessary if a sales order is to be added automatically. If this data is unavailable, you cannot create a sales order document.
    I was not able to find the fields to fill the distribution channel and divison in the Idoc structure. I have filled in Sales organization in E1EDK14 segment as 3000.
    I am not able to figure out the cause for the error.
    Same data works fine from BAPI_SALESORDER_CREATEFROMDAT2.
    Please help.
    Thanks,
    Suma
    Edited by: Suma B on Jun 17, 2008 11:12 AM

    Hello Suma
    In this case I would recommend to debug the IDoc processing.
    Call transaction WE19 and start the inbound processing of your IDoc in debugging mode. The error message will most likely occur in function module IDOC_INPUT_ORDERS.
      LOOP AT idoc_contrl.
    * SET/GET Parameter und interne Tabellen neu initialisieren
    * initialize SET/GET Parameter and internal tables
        PERFORM initialize_organizational_data.
    * IDOC-Segmente in die entsprechenden Anwendungsdaten übernehmen
    * Move IDOC to internal tables
        PERFORM interpret_idoc_orders.                    "<= check here
    * Prüfen ob gewisse Segmente gefüllt sind
    * check IDOC-Segments
        PERFORM check_idoc_segments.                 "<= check here
    * Prüfen und Ermitteln von Organisationsdaten
    * check internal tables and determine organization data
    Regards
      Uwe

  • Create Sales Order using IDoc

    Hi All,
    Based upon customer's input file which contains header and line item details I have to create sales order in our system. We would like to use IDoc for this. Customer will send us file once a day by email or FTP.
    For this I have created a port and partner profile but I am not sure how the process will get initiated?
    Can someone please let me know how can I do this? There is now outbound process involved, I just need to create sales order based upon input file using IDoc.
    Regards,
    Sanjay

    HI,
    You cannot directly call the function modules that process the idoc, because these functions are called dynamically by the ALE layer and the function expects data in a certian format (IDoc format ).
    BAPI would be the best way to go for your scenario.
    However there is a workaround if you want to use IDoc only. You can follow this approach :
    1. Populate an outbound ORDERS05 IDoc from the file data.
    2. Distribute it to the same system, i.e sender system and receiver system is same.
    3. On the Inbound side the Idoc that you created on the outbound side will be received and processed.
    "R3  File----->Outound ORDRES05  -----
    ______________________________________|
    |
    '------> " Inbound ORDERS05 ( in the same R3 system)
    The tricky part is sending an Idoc and receiving in the same system, but you can find how to do this on the wiki pages.
    regards,
    Advait

  • I have deleted a sales order,how to retreve the same document number

    Hai,
        I have deleted the sales order,so that document number is out.When i craete the next order will i get the same number which i have already deleted.
    I want the same number again,for that what should i do...
    I dont want that number be missed,the reason is there should be a flow in number,with out missing some numbers in between.
    Thx
    Venu
    Edited by: venugopal on Aug 6, 2008 9:12 AM

    Dear Venu
    Yes this is possible but should not hand over the responsibility to end users.
    B4 implementing this in production, please test a document and proceed.
    Go to VOV8, select your order type and execute.  There see what numeric value is maintained against the field "No.range int.assgt".  Now go to VN01, [click on Status]  tab and go to that number.  On your right, you can see the last generated sale order number with editable option.  You can change it.
    For example, if your last created sale order reference is 805, you will see this 805 in the above area.  Change it to 804 and save.  Now if you create a new order, the reference of that particular sale order will again be 805.
    But as I already mentioned, each and every time, you need to go and change this area which is not recommended. 
    thanks
    G. Lakshmipathi

Maybe you are looking for