Which is the  field for   Sold-to-party   and     ship-to-pary   in  BAPI

i am using   BAPI_SALESORDER_CREATEFROMDAT1  This   BAPI  for sales order creation
but i want to pass sold-to-party and  ship-to-party  in   Header Data
but i can't find that field in BAPI
so please suggest me

Use  BAPI BAPI_SALESORDER_CREATEFROMDAT2, instead of the above BAPI.
Check this sample. Replace all the values with your test data and check it.
report  z_salesorder_create.
data:
  order_header_in type bapisdhd1,
  return type table of bapiret2,
  order_partners type table of bapiparnr,
  order_part     type bapiparnr,
  order_items_in type table of bapisditm,
  order_items type bapisditm,
  order_items_inx type table of bapisditmx,
  order_items_x   type bapisditmx,
  salesdocument type bapivbeln-vbeln,
  order_header_inx type bapisdhd1x.
order_header_inx-doc_type =   'X'.
order_header_inx-sales_org =  'X'.
order_header_inx-distr_chan = 'X'.
order_header_inx-division =   'X'.
order_header_inx-req_date_h = 'X'.
order_header_inx-purch_date = 'X'.
order_header_inx-doc_date  = 'X'.
order_header_inx-currency = 'X'.
order_header_inx-sd_doc_cat = 'X'.
order_header_in-doc_type =   'TA'.
order_header_in-sales_org =  '1000'.
order_header_in-distr_chan = '12'.
order_header_in-division =   '00'.
order_header_in-req_date_h = sy-datum + 7.
order_header_in-purch_date = sy-datum.
order_header_in-doc_date  = sy-datum.
order_header_in-currency = 'EUR'.
order_header_in-sd_doc_cat = 'C'.
order_items-itm_number = '000000'.
order_items-material = 'C-1030'.        "replace with your material and plant
order_items-plant = '1200'.
order_items-target_qty = '10'.
order_items-target_qu = 'M'.
order_items-sales_unit = 'M'.
append  order_items to order_items_in.
order_items_x-itm_number = '000000'.
order_items_x-material = 'X'.
order_items_x-plant = 'X'.
order_items_x-target_qty = 'X'.
order_items_x-target_qu = 'X'.
order_items_x-sales_unit = 'X'.
append  order_items_x to order_items_inx.
"Sold to party
order_part-partn_role =  'AG'.
order_part-partn_numb = '0000001033'.
order_part-itm_number = '000000'.
append order_part to order_partners.
"Ship-to party
order_part-partn_role =  'WE'.
order_part-partn_numb = '0000001033'.
order_part-itm_number = '000000'.  "<-----For header you need to mention the like this..
append order_part to order_partners.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
  exporting
    order_header_in               = order_header_in
    order_header_inx              = order_header_inx
importing
   salesdocument                 = salesdocument
  tables
    return                        = return
    order_items_in                = order_items_in
    order_items_inx               = order_items_inx
    order_partners                = order_partners.
"Read the return with type 'S' if success then commit.
call function 'BAPI_TRANSACTION_COMMIT'

Similar Messages

  • There is any table which makes the relation between sold to party and ship

    Hi Gurus,
    There is any table which show the relation between ship to party and sold to party.
    regards
    gursharan

    You can get this information from KNVV, KNVP Tables.
    Refer following link: http://www.erpgenie.com/abap/tables_sd.htm ....Customer Master Data for more detailed explanation.
    Please award points if you find this information useful / resolves your issue.
    Letme know if you need more information.
    Thanks,
    Ramesh

  • Account name not showing in 'Partners' Block for sold to party and ship to

    Hi Experts,
    I created a return order by confirming the Account.
    Under 'Partners' Sold-to-party, ship-to-party, activity partner showing the account name but when i clicked on any of these links it is not showing the BP name.
    Please suggest why it is not showing the BP name inside the sold-to-party,ship-to-party, activity partner.
    Thanks in Advance,
    Kishore

    Hi Experts,
    I created a return order by confirming the Account.
    Under 'Partners' Sold-to-party, ship-to-party, activity partner showing the account name but when i clicked on any of these links it is not showing the BP name.
    Please suggest why it is not showing the BP name inside the sold-to-party,ship-to-party, activity partner.
    Thanks in Advance,
    Kishore

  • Sold to party and Ship to part y fields in VA01 disabled.

    01.10.2008
    Hi friends,
    In one of the client when i use transaction code VA01 for a particular document type i find the Sold to Party and Ship to party are greyed off. I am not able to enter any data into it.
    In the sand box the same document type works fine. How will i trace which transaction variant is linked which is disabling this fields. Please advise.
    Regards,
    udaynath.

    Hi Krishnan
    It is not the problem with the Document type.
    I think,you have not assigned the "Partner Type" to the "Partner Function".
    Just go to your Partner determination Procedure in IMG, go to  "Partner Function" folder in the dialog box.
    Select your Sold-to-party and assign the "Partner Type" KU (Customer) to it.
    Similarly assignthe Partner Type KU to your Ship-to-party and save it.
    Now, create an order and there will be no problem.

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

  • 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

  • Which table holds data for plant, soldto party and shipto party? Help!

    Hi Experts,
             Which table holds data for plant, soldto party and shipto party?
             Basically I want get palnt and associated soldto party and shipto party.
             Kindly help!
    Thanks
    Gopal

    Hi
    You have to link VBAK and VBAP tables.
    regards
    Srinivas

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

  • Sold to party and ship to address is different

    Dear Experts,
    Sold to party and ship to party is different  address but when invoice is happened sold toparty adrees  displayed in ship to party
    how i can make the changes for ship to party kindly help me in this regards
    Thanks a
    Basavaraj

    Hi,
    This is what you needs to do.
    Create your Sold to Party "A" using the Account Group "Sold to Party" from Tx: XD01
    Then Create your Ship to Party "B" using the Account Group "Ship to Party" from Tx: XD01
    Then go to you Sold to Party using Tx: XD02
    Go to Sales area data / Partner tab
    Add your Ship to Party "B" there with Partner Function "Ship to Party"
    Save
    Now create a sales order from Sold to Party "A"
    Enter Sold to Party "A" and press enter
    You will get a pop up to select relevant Ship to Party for the Sales Order Header level with "A" or "B"
    Select relevant one at there.
    If you select "B" at the header, same will get copied to all line items later. Else you can select "A" and then change only the relevant line item partner to Ship to "B" at Item level as well.
    When you create delivery, relevant Ship to will be picked form the line item level.
    You can do same for Bill to Party and Payer as well.
    Best regards,
    Anupa

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

  • 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

  • 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

Maybe you are looking for