Please enter sold-to party or ship-to party USING BAPI_SALESORDER_CREATEFRO

Hello Guys,
Im having a hard time in inserting the data using BAPI_SALESORDER_CREATEFROMDAT2.
The return error is Please enter sold-to party or ship-to party  how can i solve this?whats the reason  behind this?
The return error are :
   |V4                  |219   |Sales document  was not changed        
   |VP                  |112   |Please enter sold-to party or ship-to pa
   |V4                  |219   |Sales document  was not changed        
Please help. Will reward points to those helpful one.
Thanks in advance.
aVaDuDz
This is my sample code.
*& Report  Z_ORDER_CREATE_SPA_HBR
REPORT  z_order_create_spa_hbr.
Parameters
PARAMETERS: p_order LIKE vbak-vbeln.
We need to create a new order number P_New from an existing order
*P_order
linked to an existing quotation P_quote
Tables
TABLES: vbak,
        vbap,
        vbkd. "Sales Document: Business Data
Data and internal table
DATA:  order_header_in1       LIKE bapisdhd1.
DATA:  order_header_intx      LIKE bapisdhd1x.
DATA : salesdocument1         TYPE bapivbeln-vbeln.
DATA : return2                TYPE bapiret2.
DATA:  order_partners1        TYPE bapiparnr  OCCURS 0 WITH HEADER LINE.
DATA:  order_items_in1        TYPE bapisditm  OCCURS 0 WITH HEADER LINE.
DATA:  order_items_in1x       TYPE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA:  order_schedules_in1    TYPE bapischdl  OCCURS 0 WITH HEADER LINE.
DATA:  order_schedules_in1x   TYPE bapischdlx OCCURS 0 WITH HEADER LINE.
DATA : return1                TYPE bapiret2   OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
  PERFORM order_header_in.
  PERFORM ORDER_PARTNERS.
  PERFORM order_schedules_in.
  PERFORM ORDER_ITEMS_IN.
  PERFORM call_function.
*& Form call_function
text
--> p1 text
<-- p2 text
FORM call_function .
  CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
   SALESDOCUMENTIN               = P_new
    order_header_in               = order_header_in1
  ORDER_HEADER_INX              = order_header_intX
  SENDER                        =
  BINARY_RELATIONSHIPTYPE       =
  INT_NUMBER_ASSIGNMENT         =
  BEHAVE_WHEN_ERROR             =
  LOGIC_SWITCH                  =
  TESTRUN                       =
  CONVERT                       = ' '
  IMPORTING
    salesdocument                 = salesdocument1
  TABLES
    return                        = return1
    order_items_in                = order_items_in1
  ORDER_ITEMS_INX               = ORDER_ITEMS_IN1X
    order_partners                = order_partners1
    order_schedules_in            = order_schedules_in1
  ORDER_SCHEDULES_INX           = ORDER_SCHEDULES_IN1X
  ORDER_CONDITIONS_IN           =
  ORDER_CONDITIONS_INX          =
  ORDER_CFGS_REF                =
  ORDER_CFGS_INST               =
  ORDER_CFGS_PART_OF            =
  ORDER_CFGS_VALUE              =
  ORDER_CFGS_BLOB               =
  ORDER_CFGS_VK                 =
  ORDER_CFGS_REFINST            =
  ORDER_CCARD                   =
  ORDER_TEXT                    =
  ORDER_KEYS                    =
  EXTENSIONIN                   =
  PARTNERADDRESSES              =
  IF NOT salesdocument1 IS INITIAL.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait   = 'X'
      IMPORTING
        return = return2.
  ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
  ENDIF.
ENDFORM.                    "call_function
*&      Form  ORDER_HEADER_IN
      text
-->  p1        text
<--  p2        text
FORM order_header_in .
  order_header_in1-doc_type   = 'ZMCH'.
  order_header_in1-sales_org  =  '2000'.
  order_header_in1-distr_chan =  '20'.
  order_header_in1-division   =   '30'.
  order_header_in1-incoterms1 = 'FH'.
  order_header_in1-sales_off  = '3102'.
  order_header_in1-sales_grp = '301'.
  order_header_in1-ORD_REASON = 'Cost Center RelevanT'.
  order_header_in1-SALES_DIST  = '230144'.
  order_header_in1-PURCH_DATE = '07/31/2008'.
  order_header_in1-PURCH_NO_C = 'UPLOAD2-TEST'.
  APPEND order_items_in1.
ENDFORM.                    " ORDER_HEADER_IN
*&      Form  order_schedules_in
      text
-->  p1        text
<--  p2        text
form order_schedules_in .
order_schedules_in1-req_date     = sy-datum + 20.
  order_schedules_in1-req_qty      = vbap-kwmeng.
  APPEND order_schedules_in1.
endform.                    " order_schedules_in
*&      Form  ORDER_PARTNERS
      text
-->  p1        text
<--  p2        text
form ORDER_PARTNERS .
  order_partners1-partn_role         = 'PH'.
  order_partners1-partn_numb         = '1200038'.
   APPEND order_partners1.
endform.                    " ORDER_PARTNERS
*&      Form  ORDER_ITEMS_IN
      text
-->  p1        text
<--  p2        text
form ORDER_ITEMS_IN .
order_items_in1-ITM_NUMBER = 1.
order_items_in1-MATERIAL ='300040'.
order_items_in1-TARGET_QTY = 1.
order_items_in1-SALES_UNIT = 'MON'.
APPEND order_items_in1.
endform.                    " ORDER_ITEMS_IN

Hi AVA MARIE TRINIDAD.
Pass QUOTATION_PARTNERS-ITM_NUMBER = '0000000'.
And pass customers like this.
QUOTATION_PARTNERS-PARTN_NUMB = '1000000'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
   EXPORTING
     INPUT         = QUOTATION_PARTNERS-PARTN_NUMB
  IMPORTING
    OUTPUT        = QUOTATION_PARTNERS-PARTN_NUMB

Similar Messages

  • Sold to Party and Ship to party field are in grey out mode in VA01.

    Hi Friends,
    I am facing a very critical situation, Please help me on this.
    While creating the sales order by VA01, the Sold to Party and Ship to Party field are in grey out, so we cannot enter sold to party and ship to party. This is happening for all Order types.
    And while checking the existing sales order by VA02, so I found that at Header level and Item level the Partner tab are disable
    ( mena partner tab are in grey mode,).
    But when we click on sold to party field in VA02 it directly moves to partner but all Partner shown in Sales tab.
    I have check all the partner function and partner determination configuration.
    So can any one help me out in this, how in VA01 sold to party and ship to party field are in grey out mode.
    How in VA02 the partner tab are disable.?
    Thanks
    Irfan Ullah
    09370236510

    Hai Irfan Ullah,
    In Sales - customer
    1. Partners are listed (SP,BP,PY, SH)for account group and Partner Determination procedure(TA) is assigned to it
    Now for sales order type you need to assign the partner determination process
    SPRO
    Sales and Distribution
    Basic Functions
    Partner Determination
    Set Up Partner Determination
    Execute
    Set Up Partner Determination for Sales Document Header
    Select TA - standard order from the right side list
    and select Partner Determination Procedure Assignment (from left)
    Now assign your sales type to Partner determination TA.
    Create a SALES order you can find the sold to and ship to are editable.
    Regards,
    Mani

  • Sold to Party and Ship to party are in grey out mode in VA01.

    Hi Friends,
    I am facing a very critical situation, Please help me on this.
    While creating the sales order by VA01, the Sold to Party and Ship to Party field are in grey out, so we cannot enter sold to party and ship to party. This is happening for all Order types.
    And while checking the existing sales order by VA02, so I found that at Header level and Item level the Partner tab are disable
    ( mena partner tab are in grey mode,).
    But when we click on sold to party field in VA02 it directly moves to partner but all Partner shown in Sales tab.
    I have check all the partner function and partner determination configuration.
    So can any one help me out in this, how in VA01 sold to party and ship to party field are in grey out mode.
    How in VA02 the partner tab are disable.?
    Thanks
    Irfan Ullah
    09370236510
    Edited by: Lakshmipathi on Aug 4, 2011 4:30 PM
    Thread Locked - Reason Cross Posted

    Hai Irfan Ullah,
    In Sales - customer
    1. Partners are listed (SP,BP,PY, SH)for account group and Partner Determination procedure(TA) is assigned to it
    Now for sales order type you need to assign the partner determination process
    SPRO
    Sales and Distribution
    Basic Functions
    Partner Determination
    Set Up Partner Determination
    Execute
    Set Up Partner Determination for Sales Document Header
    Select TA - standard order from the right side list
    and select Partner Determination Procedure Assignment (from left)
    Now assign your sales type to Partner determination TA.
    Create a SALES order you can find the sold to and ship to are editable.
    Regards,
    Mani

  • Sold to party and Ship to party are the same but has different address

    Hi,
    I have problem here wherein Sales order has the same sold to party and ship to party but they have different address. When the customer master data is changed the sold to party in the sales order is also updated but the ship to party is not updated.
    I've checked the table VBPA and I noticed that the value of ship to party VBPA-ADRDA is 'E' (manually enetered).
    Is this the reason why the address of ship to party in sales order is not updated whenever the customer master is change?
    Another question, how does ship to party entered in sales order manually?
    Thanks in advance.

    Hi,
    Please correct me if I have understood the scenario incorrectly which I try to explain below:
    Sales order is created where SP and SH both have same address initially and while creating the SO, address of the SH was changed manually by Header>partners>SH
    Now master data for that customer is changed for address. As per the standard functionality of SAP, all sales order created for that customer will have new address for SP only.
    If address of SH needs to be changed in SO, it has to be done manually by the same way as explained in the above mails.
    As far as manually entering the SH in SO is concerned, system will automatcally selects the SH if only one record is available for SH. If you have specified more than one SH, system will give you an option to select one by displaying a pop up.
    Please let me know if you find this explanation suitable.
    Ravi

  • Sold-to-party and Ship-to-party is disable

    Dear Expert,
    In SD IMG I assigned debit memo sales docs type into sales area to sales documents type.  Initial screen for VA01 it is okay. But showing in next screen sold-to-party and ship-to-party is disable. I can not select the customer.
    Please help me.
    Thanks & B.Rgds

    Hi Bishnu,
    1. Are you creating Debit memo or Debit memo request in VA01. I hope you are creating debit memo request.
    2. Do you have any of these order creation enabled through IDOCs.
    3. Do you use screen variants or transaction variants.
    If point2 is in process, then it is very much possible that SP/SH is always proposed from IDOC and not manually enterable.
    Even if 2 is not in process, it can be enabled by some user exit to make those fields as uneditable.
    This can be due to various reasons  like
    1. The DMR is to be created only with reference to an order and not without reference. If you create DMR with reference, these values come as automatically filled.
    2. The creation of DMR has to be made possible only by some selected group of individuals and you may not the right person to create a DMR.
    Please analyse the issue on all these fronts.You should be a ble to get the solution.
    You can reward if this approach helps you

  • Enhancement for validating SOLD TO PARTY and SHIP TO PARTY

    Hi All,
    Have written in the form routine USEREXIT_CHECK_VBAK to validate the sold to party and ship to party, but whenever error is encounted the  input fields comes in display mode but i need that in change mode so that user can enter the input again.
           Quick response will be appriciated..
    Thanks & Regards,
    Parvez..

    Hi,
    Since the userexit code is not called within the CHAIN...ENDCHAIN or using the FIELD statement...
    When you get the error message the entire screen will be blocked..
    Try giving a warning message..
    THanks,
    Naren

  • Enabling sold to party and ship to party on Sale order creation....

    Friends,
    When i start creating a sale order,
    1 .Iin Sale order screen the sold to party and ship to party are in the disable mode, i could not able to enter any value...how to make it to enable...
    2. but  allowing  me to enter the item and qty, and after entering these value i tried to check for the pricing condition using the condition tab, but i could  not able to see any procedure or condition type...though i defined the pricing procedure(V/ov8) assinged through OVKK...
    Thanks
    Ramesh

    HI,
    Check the Following Configuration
    SPRO -->Sales & Distribution -- > Basic Function >Partner Determination>Set Up Partner Determination-->Set up Partner Determination for Sales Document Header
    Check and all Five Steps i think you didn't assign the Partner Determination Procedure to Sales Document type
    Assign TA to your Sales Document Type or if you create any own partner determination Procedure assign that to Sales Document type
    Check & Revert
    Regards,
    Prasanna
    Edited by: prasanna_sap on Sep 7, 2011 12:12 PM

  • How I can to download sold-to-party and ship-to-party with the relationship

    Hello,
    I want to know how I can to download sold-to-party and ship-to-party through Middleware form R/3 to CRM and kept the relationships just as be defined in R/3
    When I downloaded a sold-to-party or a ship-to-party to CRM, they created in CRM as BPs without the relationships.
    How can I do this?
    Thanks and Kind regards,
    Ohad

    Hi,
    I downloaded "BUPA_REL" object, only the Contact Persons was downloaded,
    But is not relation ship to party with sold to party.
    So it's not solve my problem,
    Please help me.
    Thanks and Best regards,
    Ohad

  • Sold to Party and Ship to Party Function module or BAPI

    Hi Experts,
       1) I need to create customer data,So i need to Function module or BAPI.
       2) Address create data Function module or BAPI.
       3) Sold to Party and Ship to Party Function module or BAPI relation ship.
    Thank you ,
    Dinesh Reddy
    Moderator message: anything else? please search for available information before asking.
    Edited by: Thomas Zloch on Oct 14, 2011 3:19 PM

    Hi,
      Try these Bapis
    BAPI_BUS2001_PARTNER_GETDETAIL Get Detail Data for Partner Data
    BAPI_BUS2001_PARTNER_GETLIST   Get Overview List for Partner Data
    Regards,
    Prashant

  • Conflict in sold to party and ship to  party

    hi ,
    i created a sales order where sold to party and ship to party are same.now in my program i selected sold to party from table vbak. now this customer has an extra zero (i.e. if my customer number is E002120 ,when i debug and see the customer number it is displayed as E0021200).intrestingly the ship to party is populated with E0021200 in the VA03.i need to select data from a Ztable depending on this customer where i'm getting the error(as the Ztable has E002120 as its customer number).can any one help me in resolving this.thank you.
    Challa.

    Is this happening for all ship-to and sold-to parties??
    Check if conversion routine exists for the fileds in the table.

  • Tax Determination Bases on Bill to Party and Ship to Party

    Hi Guru ,
    I have a requirement Tax should be determined based on Bill to Party and Ship to Party.
    If Bill to and Ship to are  Overseas Customers then '0' TAX.
    For all remaining Customers 7 % Tax
    Could you please advice
    Thanks

    Hello,
    Define two  ACCESS SEQUENCE with the combination of Region code/Country key
    Define the two TAX  CONDITION types and assign the Access sequence one for each scenario
    In OVK1 assign the Country key and TAX CONDITION and in OVK3 assign the tax category as 0 for the Overseas customer and 1 for Domestic customer
    Then in VK11 maintain the condition records as 0% for Overseas customers and  7% for the Domestic customers.
    Regards,
    santosh

  • Partner determination sold to party and ship to party.

    Hi frnds,
      Currently in the customer master in partner function we are maintaining ship to party the same as sold to party , now for some of the customer the ship to party and sold to party are different , so while creating a sales when i enter the sold to party , the system propose the ship to party and on that basis the delivery and billing should take place.
    What are the configuration settings required to be done to this , i will maintain the ship to party in customer master partner determaination, but when i create the sales order and when i enter the sold to party , it should propse the ship

    Hi  Rakesh,
    As per SAP standard setting ship to party will be determined from Sold to party master , if that is maintained. I suggest to copy Standard and test again.
    Also ,hope you have not made any changes to the partner determination procedure fro Sales Document at header Level. This will also impact .
    Sharing a few useful link for more clarity :--
    http://www.freesaptutorial.com/partner-determination-in-sap-sd/
    Re: Ship-to party is not assigned to a sold-to party
    http://www.sap-basis-abap.com/sd/steps-for-partner-determination-config-in-img.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/3c/92ecee484a11d5980800a0c9306667/content.htm
    http://wiki.sdn.sap.com/wiki/display/Snippets/howtogetship-topartyforasoldto+party
    Thanks/Rajesh

  • Sold-to-party and ship-to-party

    Hi all,
    I could not find the above fields in the structures of bapi:
    BAPI_SALESORDER_CREATEFROMDAT2
    please write me these fields, which fields are they ?
    Thanks.
    deniz.

    data : ORDER_PARTNERS like BAPIPARNR occurs 0 with header line.
          ORDER_PARTNERS-PARTN_ROLE = 'AG'. ie, sold to party
          ORDER_PARTNERS-PARTN_NUMB = ITAB-PARTN_NUMB_SP. ie, sold to party partner number
          APPEND ORDER_PARTNERS.
          ORDER_PARTNERS-PARTN_ROLE = 'WE'. ie, ship to party
          ORDER_PARTNERS-PARTN_NUMB = ITAB-PARTN_NUMB_SH. ie, ship to party partner number
          APPEND ORDER_PARTNERS.
    pass this internal table to BAPI_SALESORDER_CREATEFROMDAT2
    ORDER_PARTNERS                = ORDER_PARTNERS

  • Sold to Party from Ship to Party

    Hi,
    We have a requirement that when creating a service order, we need the sold to party to be determined when the ship to party is entered.
    Can someone pls tell how this can be achieved
    Points will be given
    Prachi

    Hi Prachi,
    This process is known as reverse determination. and reversal of the search direction for partner determination uses business partner relationships using the field Reverse Determination within the access sequence customizing setting. Path is IMG>CRM>Basic functions--> Partner Processing
    You create a access sequence for partner determination which should have only a single step.
    This setting is only relevant when you enter either Business Partner Relationships or BP Relationships by Sales Organization as the source for this single access.
    During partner determination using business partner relationships, the system normally looks in a partner's master data for the "Has the ..." relationship, such as "Has the ship-to party". Marking this field sets the system to look for the same relationship, but in the reverse direction, such as "Is the ship-to party".
    Leave the field Reverse Determination unmarked to set the system to function as usual.
    Mark the field to set it to read relationships in reverse for this single access.
    You make the following settings for the access sequence with one single access:
    <b>Source: Business Partner Relationships
    Details on the source: Ship-to Party
    Reverse source (this field): marked</b>
    You assign this single access to the partner function Sold-to Party.
    For the Ship-to Party, you can have either of the following settings :
    1) If the document does not have a preceding document then do not assign any access sequence to the Ship-to-Party partner function or
    2) If the document have a preceding document which will pass on the Ship-to Party details to the current one , then you can assign standard Access Sequence 1000 or your own copy of the standard access sequence number 1000.
    Hope this would help.
    Regards,
    Rekha Dadwal
    <b>
    You gain a point for every point that you reward. So reward helpful answers generously</b>

  • How to determine "Sold-to" party from "Ship-to" party

    Hi friends,
    <<text removed>>
    I have to determine the "Sold-to" party for a particular "Ship-to" party. Could you please let me know what is the Table we need to query for this??
    I have already checked out table KNVP, however I could not find the correct "Sold-to" party for the "Ship-to" party.
    <<text removed>>
    Thanks,
    Vishal.
    Edited by: Matt on Feb 11, 2009 11:22 AM  An emergency on your part doesn't consititute an emergency on our part.  To understand why your post is edited - read this http://catb.org/~esr/faqs/smart-questions.html
    Edited by: Matt on Feb 11, 2009 11:23 AM

    Hello Vishal,
    Ship-To party is assigned to Sold-To for each sales area. So the first step to get Ship-To, is to determine the Sales Area, if you don't have that then you can use the FM   SD_PARTNER_SALES_AREA_CHECK to get the Sales Area.
    If you already have the Sales area, then you can use the following FM, which will return Ship-To party code.
    *  Get Sold-To from Ship-To Party
       Call Function 'SD_PARTNER_GET_SOURCE_PARTNER'
          Exporting
             I_KUNNR             = cKUNNR  "Sold-To party
             I_PARVW             = 'WE'
             I_PARVW_SOURCE      = 'AG'
             I_VKORG             = cVKORG
             I_VTWEG             = cVTWEG
             I_SPART             = cSPART
             I_CALL_BAPI         = ' '
          Importing
             E_KUNNR             = cKUNAG
          Exceptions
             No_Partner_Found    = 1
             No_Partner_Selected = 2
             Others              = 3.
    Let us know if this helped...
    Amit Purohit.

Maybe you are looking for

  • Disabling subscreen fields..

    hi, i have a screen with a subscreen that has a tabstrip with 5 tabs. during one of the operations i need to disable all the fields in all the screen areas of that screen inclduing the subscreen tabstrip fields. its not working, in my PBO module i wr

  • Does Siri come on the iPhone 4?

    Does Siri only come wit da 4s? Or does it also come wit iphone 4 also?

  • When are RAW files modified?

    I know that Lightroom is based on the idea of non-destructive editing. However, even tho I'm still a LR newbie, it does look to me like there are a few cases in which LR does modify a RAW file as it came from the camera (e.g., the NEF bug). Where wou

  • Firefox crashes in safe mode after clean install

    Crash ID: bp-554928df-de36-4d6c-8965-d4bd02150127 Hi, just recently my Firefox 35 has been crashing at launch even in safe mode on Mac Os X Mavericks 10.9.5 on a Mac Mini 2.3 Ghz Intel Core i5. I have tried: - deleting firefox and mozilla folders in

  • Unable to find the calculation manager option in menu

    Hi All, I configured calculation manager in my machine [version: 11.1.2]. I am unable to find the calulation manager option in the menu[Navigate->Administer->calculation manager]. calculation manager is up and running . Kindly guide me to overcome it