Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Create CRM_ORDER_MAINTAIN - Set Partner_function Problem

brkcnplt
Explorer
0 Kudos

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.
4 REPLIES 4

brkcnplt
Explorer
0 Kudos

any idea works a lot .. I need to set partner_function = '00000001' only for this document

michael_piesche
Active Contributor
0 Kudos

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.

0 Kudos
brkcnplt, is your problem solved or do you require further help?

michael_piesche
Active Contributor
0 Kudos

brkcnplt, please follow up on your open question.

  • comment answers or your question if there are still open issues.
  • otherwise mark an answer as accepted if it helped you solve your problem
  • or post an answer of yourself and accept it if you found another useful solution yourself
  • or redirect your question to another question that is related and was useful to solve your problem
  • in the end, close your question