cancel
Showing results for 
Search instead for 
Did you mean: 

Create CD using CRM_ORDER_MAINTAIN

0 Kudos

Hi,

I am trying to Create Change Document in Solman using custom program. I am using CRM_ORDER_MAINTAIN. I could able to create CD successfully. But the Change Cycle/ phase, ID, Branch information is not coming. I tried filling up CT_DOC_FLOW, but no result. Can anyone please help how to use this FM for creating CD.

Using SM_CRM, if we enter Change Cycle, all the information is getting populated automatically. How can we do it using custom program?

We are using Solman 7.2.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

The issue is resolved, after calling CRM_ORDER_MAINTAIN, inserted record in the table TSOCM_CR_CONTEXT, then called CRM_ORDER_SAVE, BAPI TRANSACTION COMMIT.

The CD got created with the Change cycle data.

But the Configuration item is not getting filled in the CD. Creating CD manually using SM_CRM .. The Configuration item is getting filled...any inputs for this?

former_member776321
Discoverer
0 Kudos

Hi I am getting the same error as you, can you please help me by sharing your code and how you resolved the issue

0 Kudos

Hi Taran,

how did you solved the issue? I'm able to fill Configuration Item fielb but not the Change Cycle.

After calling CRM_ORDER_MAINTAIN, how do you inserted record in TSOCM_CR_CONTEXT? Which values you passed to it?


Thank you for a response!

schaeferp95
Discoverer
0 Kudos

Hi Taran,

i am also missing the Configuration Item. How did you fill it?

Regarding your question, this is how i fill the Change Cycle:

You can get the needed info from the methods:

cl_aic_cm_release_api=>GET_RELEASE_DATA_FOR_CYCLE

cl_hf_helper=>get_object_ids_for_smi

DATA ls_cr_context TYPE tsocm_cr_context.
CLEAR ls_cr_context.

ls_cr_context-client = sy-mandt.
ls_cr_context-guid = lv_guid.
ls_cr_context-item_guid = lv_guid.
ls_cr_context-created_guid = lv_guid.
ls_cr_context-process_type = lv_proc_type.
ls_cr_context-project_id = ls_release_cycle-smi_project.
ls_cr_context-solution_id = lv_solution_id.
ls_cr_context-product_id = ls_product-product_id.
ls_cr_context-slan_id = ls_release_cycle-release_component.
ls_cr_context-sbra_id = ls_release_cycle-branch_id.

CALL METHOD cl_ai_crm_cm_cr_cont_run_btil=>update_cr_context
EXPORTING
is_cr_context = ls_cr_context.

COMMIT WORK AND WAIT.

I hope this helps


Miguel_Ariño
Advisor
Advisor
0 Kudos

Hello,

ChaRM enters CRM document flow entries and its own document flow entries (table TSOCM_CR_CONTEXT, etc) to the task list, Change Cycle and predecessor request for change in the case of creation from the request for change.

You may check class CL_HF_HELPER, in particular methods SET_BO_LINK_TO_CHNG_DOC and SET_BO_TASKLIST_OF_CHNG_DOC.

Best regards,

Miguel Ariño

mark_somper
Discoverer
0 Kudos

Hi Taran,

I would suggest setting an external breakpoint on the function module /TMWFLOW/BASCNTRL_CREATE and creating a change document with the CRM_UI again. If program execution stops there this is the function module you need to create the cycle and you can examine the four input pararmeters that are involved.

Best regards
Mark