Skip to Content
author's profile photo Former Member
Former Member

Assign different ship to party for each material in a sales order in CRM?

Hi all,

I need to create a sales order in CRM, such that the sales order contains more than 100 materials at item level and each material should be shipped to a different ship to party.

That is for 100 materials in sales order I need to ship to 100 different customers.

The 100 ship to partyu2019s are maintained for the business partner in relation ships tab in /nBP.

The CRM configuration is done in such a way that when we enter a material while creating a sales order in CRM,u2026u2026.a window pops up asking us to select the ship to party for that material.

No I need to replicate this programmatically. I generated a sales order in CRM programmatically using BAPI_SLSTRANSACT_CREATEMULTI. u2026 Now I need to make changes such that I have a provision to assign ship to party for each materialu2026

How can I do this? Can any one tell me if there is a BAPI or Function Module available so that I can assign a different ship to party for each material in sales order?

Regards,

Jessica Sam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 08:08 PM

    Hi Jessica,

    You can use function module CRM_ORDER_MAINTAIN. You pass partner functions through IT_PARTNER import parameter. you need to know the PARTNER_FCT number to identify ship to party and assign relevant PARTNER_NO for each material

    Hope this will give you some direction to proceed

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Just very similar to how you were able to set the Ship-To at the header level, you got to do this at the Item level. Only the REFKIND and the GUIDS are different. For items, the REFKIND is B - I guess. Here again, use the CRM_ORDER_READ and CRM_ORDER_MAINTAIN report programs to help you through.

      Easwar Ram

      http://www.parxlns.com

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 08:36 PM

    Yes..Eswar is correct. You need to assign REF_GUID if it is already created order else that should be REF_HANDLE. At header leve partner you need to give REF_KIND as A and for Items REF_KIND is B. rest of all values like partner function number, partner number are same.

    GOOD LUCK

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 08:40 PM

    Here is sample code. In that highlighted portion is different. check this out

    DATA: ls_partner TYPE crmt_partner_com,

    ls_input_fields TYPE crmt_input_field,

    lt_fieldname TYPE crmt_input_field_names_tab,

    ls_fieldname LIKE LINE OF lt_fieldname.

    ls_partner-ref_handle = p_iv_handle.

    ls_partner-ref_partner_handle = 1.

    ls_partner-ref_kind = 'A'.

    ls_partner-display_type = 'BP'.

    ls_partner-no_type = 'BP'.

    ls_partner-kind_of_entry = 'C'.

    • licensee

    ls_partner-partner_fct = '00000069'.

    ls_partner-partner_no = w_but000-partner.

    INSERT ls_partner INTO TABLE gt_partner.

    • Bill to party

    IF NOT w_con_header-billtoparty IS INITIAL.

    ls_partner-partner_fct = '00000003'.

    ls_partner-partner_no = w_but001-partner.

    INSERT ls_partner INTO TABLE gt_partner.

    ENDIF.

    IF w_con_header-billtoparty IS INITIAL.

    ls_partner-partner_fct = '00000003'.

    ls_partner-partner_no = w_but000-partner.

    INSERT ls_partner INTO TABLE gt_partner.

    ENDIF.

    • Employee

    ls_partner-partner_fct = '00000014'.

    ls_partner-partner_no = w_con_header-empresp.

    INSERT ls_partner INTO TABLE gt_partner.

    +*lsinput_fields-ref_handle = p_iv_handle.*+_

    +*lsinput_fields-ref_kind = 'A'.*+_

    ls_input_fields-logical_key = ls_partner-ref_partner_handle.

    ls_input_fields-objectname = 'PARTNER'.

    ls_fieldname-fieldname = 'DISPLAY_TYPE'.

    INSERT ls_fieldname INTO TABLE lt_fieldname.

    CLEAR ls_fieldname.

    ls_fieldname-fieldname = 'KIND_OF_ENTRY'.

    INSERT ls_fieldname INTO TABLE lt_fieldname.

    CLEAR ls_fieldname.

    ls_fieldname-fieldname = 'NO_TYPE'.

    INSERT ls_fieldname INTO TABLE lt_fieldname.

    CLEAR ls_fieldname.

    ls_fieldname-fieldname = 'PARTNER_FCT'.

    INSERT ls_fieldname INTO TABLE lt_fieldname.

    CLEAR ls_fieldname.

    ls_fieldname-fieldname = 'PARTNER_NO'.

    INSERT ls_fieldname INTO TABLE lt_fieldname.

    CLEAR ls_fieldname.

    ls_input_fields-field_names = lt_fieldname.

    INSERT ls_input_fields INTO TABLE gt_input_fields.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.