cancel
Showing results for 
Search instead for 
Did you mean: 

ABout FM COM_PROD_MATERIAL_MAINTAIN_API

Former Member
0 Kudos

Hi Experts,

Here is the problem I faced.

I can use the FM above to create the product master data. But I cannot create the sales organization and distribution for it. Which I found the table type is CRMT_CRMM_PR_SALESH_MAINTAIN_T, is it correct? Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

apoorva_singh
Active Participant
0 Kudos

Hi Burney,

The table type you mentioned is for maintaining the history of Dist. chain associated with product. The table taype which you should actually be looking at is CRMT_CRMM_PR_SALESA_MAINTAIN_T.

You would be doing something like :


 DATA: lt_prmat TYPE comt_comm_pr_mat_maintain_t,
        ls_prmat TYPE comt_comm_pr_mat_maintain,
        ls_salesa TYPE crmt_crmm_pr_salesa_maintain,
        lt_salesa  TYPE crmt_crmm_pr_salesa_maintain_t.

:
:
* Sales Org maintenance
  ls_salesa-relation-sales_org   = 'O 50000610'.
*  ls_salesa-relation-distr_chan  = iv_dchan.
  ls_salesa-data-unsale_not_var = 'X'.
  ls_salesa-relation-logsys         = lv_logsys.
  ls_salesa-data-process_unit   = 'EA'.
*  ls_salesa-data-s_item_cat_group = iv_item_cat_gp.
  INSERT ls_salesa INTO TABLE lt_salesa.
  ls_salesa-relation-sales_org   = 'O 50000612'.
*  ls_salesa-relation-distr_chan  = iv_dchan.
  ls_salesa-data-unsale_not_var = 'X'.
  ls_salesa-relation-logsys         = lv_logsys.
  ls_salesa-data-process_unit   = 'EA'.
*  ls_salesa-data-s_item_cat_group = iv_item_cat_gp.
  INSERT ls_salesa INTO TABLE lt_salesa.
*  INSERT LINES OF lt_salesa INTO TABLE ls_product-data-crmm_pr_salesa.
*  ls_prmat-data-item_cat_group = iv_item_cat_gp.
  ls_prmat-relation-logsys   = lv_logsys.
  INSERT ls_prmat INTO TABLE lt_prmat.



Regards

Apoorva

Former Member
0 Kudos

HI Apoorva,

Thank you very much.

I figured it out

Edited by: burney ade on May 9, 2009 5:05 AM