Skip to Content

Create CRM_ORDER_MAINTAIN - Set Partner_function Problem

Hi Experts ,
I'm trying to create a document with using crm_order_maintain.
All of tables which are created and read , looks fine except the table partner.
When I set to partner_function to '00000001' , it shows that as '00000014' in debug mode.

 gs_partner-ref_guid = gv_h_guid. " guid which I create 
  gs_partner-ref_handle = gs_input_fields-ref_handle.
  gs_partner-partner_no = p_part.   " partner_no lets say for this case '13'.
  gs_partner-ref_kind = 'A'.
  gs_partner-ref_partner_handle = '0001'.
  gs_partner-kind_of_entry = 'B'. "inserted
  gs_partner-partner_fct = '00000001'.
  gs_partner-display_type = 'BP'.
  gs_partner-no_type = 'BP'.
  gs_partner-partner_guid = gs_partner-partner_guid.   " guid of the partner '13'
  INSERT gs_partner INTO TABLE gt_partner.

  gs_nametab = 'PARTNER_FCT'.
  INSERT gs_nametab INTO TABLE gt_nametab.

  gs_nametab = 'PARTNER_NO'.
  INSERT gs_nametab INTO TABLE gt_nametab.

  gs_nametab = 'KIND_OF_ENTRY'.
  INSERT gs_nametab INTO TABLE gt_nametab.

   gs_nametab = 'PARTNER_GUID'.
   insert gs_nametab INTO TABLE gt_nametab.

  gs_nametab = 'DISPLAY_TYPE'.
  INSERT gs_nametab INTO TABLE gt_nametab.

  gs_nametab = 'NO_TYPE'.
  INSERT gs_nametab INTO TABLE gt_nametab.

  gs_input_fields-ref_kind = 'A'.
  gs_input_fields-objectname = 'PARTNER'.
  gs_input_fields-ref_guid = gv_h_guid.
  gs_input_fields-field_names[] = gt_nametab[].
  INSERT gs_input_fields INTO TABLE gt_input_fields.

  CLEAR: gs_nametab , gt_nametab[].
What I'm missing or is there any thing else which I need to know ?
Kind Regards.
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 30, 2020 at 07:05 AM

    Can you be more specific: when does it change to 14 when instead you have set it to 1? You only say it happens in debug mode, but what actually happens on the database CRMD_PARTNER or the partner tab in trx CRMD_ORDER?

    In your coding while debugging, does it happen after CRM_ORDER_SAVE with another CRM_ORDER_READ?

    Did you try setting a breakpoint in CRM_ORDER_MAINTAIN after you used CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE and check for a Badi that might be the „culprit“?


    Also, give a short description which and how you use the CRM_ORDER_xxx FMs, so I can confirm whether you are doing it right.

    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.