COM_PROD_WARRANTY_MAINTAIN_API

Has anyone used this FM to create a material-warranty link?  Got the function to create a warranty using IT_PRODUCT and IT_SET but when I try to link a product type 01 (material) to a product type 05 (warranty ) I keep getting usage errors.  Here's basically what I am trying (error is PRDWTY is not a valid relationship)
  Product (warranty - FM only accepts type '05')
    ls_product-com_product-product_guid = ls_process-wguid.
    ls_product-com_product-product_id = ls_process-zzgan.
    ls_product-com_product-product_type = '05'.
    ls_product-com_product-upname = sy-uname.
  Set link data
    ls_link_wty-data-sourceguid = ls_process-pguid. "Material ID
    ls_link_wty-data-destinguid = ls_process-wguid. "Warranty ID
    ls_link_wty-data-sales_org = ls_process-psorg.
  Link defaults
    ls_link_wty-data-reltype = 'PRDWTY'.
    ls_link_wty-data-distr_chan = '00'.
    ls_link_wty-data-validfrom = sy-datum.
    ls_link_wty-data-validto = '99991201'.
    ls_link_wty-data-upname = sy-uname.
    ls_link_wty-update_type = 'I'.
    concatenate sy-sysid sy-mandt into ls_link_wty-data-logsys.
  Put it all together
    append ls_product to lt_product.
    append ls_link_wty to ls_interlinkages-comm_il_prdwty.
    append ls_interlinkages to lt_interlinkages.
  Make the call
    call function 'COM_PROD_WARRANTY_MAINTAIN_API'
      exporting
        it_product       = lt_product
        it_interlinkages = lt_interlinkages
      importing
        et_bapireturn    = l_return
      exceptions
        internal_error   = 0.
Any ideas on how to call this FM for linkage?

Hi Mike,
What should I pass for source and target guid.
It is appreciated if quick response
Thanks,
Raja

Similar Messages

Maybe you are looking for