Skip to Content
avatar image
Former Member

ASSIGN_TYPE_CONFLICT in SAPLCOM_PRODUCT_UI_API

Hi Experts,

I am calling FM  "COM_PRODUCT_UI_MAINTAIN" when executing from Z program.

Passing the value for IS_PRODUCT and IS_SET. But the program is terminated with dump "ASSIGN_TYPE_CONFLICT" for ABAP Program           SAPLCOM_PRODUCT_UI_API, Include - LCOM_PRODUCT_UI_APIF26.

The dump occurs only when the data is passed for IS_SET. It does not occur when data is passed for IS_PRODUCT.

The termination occurs in include LCOM_PRODUCT_UI_APIF26 - line31 ->

ASSIGN ls_set-data->* TO <lt_settype_mnt>. Attached is the dump.

Code in my Z program for calling the FM is given below.

CALL FUNCTION 'COM_PRODUCT_UI_MAINTAIN'
    EXPORTING
      is_product  = ls_product_api
      is_set         = lt_set
    IMPORTING
      et_bapireturn  = lt_return
    EXCEPTIONS
      internal_error = 1
      OTHERS         = 2.

Is there any SAP note to fix this issue? I searched in SCN, but could not find any relevant discussions.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 31, 2014 at 05:12 AM

    Hi,

    Can you check IS_SET and lt_set are same type? Type conflict errors will come mostly in case of formal and actual parameters are different type.

    For function module we need to pass same type as importing parameters in FM.

    Best Regards,

    Dharmakasi.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 31, 2014 at 07:34 AM

    Hi Josbin,

    I think that there is some kind of type mismatch occurring while the function module is getting called.

    I have attached a standard call of the Function Module which can give you some pointers regarding the correct usage of the FM. You can find the full details of the same in the following object

    Class : CL_BSP_PRODUCT_MODEL_CNTL

    Method : MODIFY_PRODUCT_CONFIGURATION

    * Fill import parameters for MAINTAIN-API:

       ls_product-com_product-product_guid        = ls_screen_structure-object_key(32).

       ls_prod_var_maintain-relation-product_guid = ls_product-com_product-product_guid.

       CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

         IMPORTING

           own_logical_system = ls_prod_var_maintain-relation-logsys.

       ls_prod_var_maintain-data                      = ls_prod_var.

       ls_prod_var_maintain-data_x-header             = on.

       ls_prod_var_maintain-data_x-instances          = on.

       ls_prod_var_maintain-data_x-part_of            = on.

       ls_prod_var_maintain-data_x-values             = on.

       ls_prod_var_maintain-data_x-variant_conditions = on.

       APPEND ls_prod_var_maintain TO lt_prod_var_maintain.

       ls_set-settype_id = gc_fragment_id-variants.

       ASSIGN ls_set-data TO <data>.

       IF <data> IS ASSIGNED.

         GET REFERENCE OF lt_prod_var_maintain INTO <data>.

         APPEND ls_set TO lt_set.

       ENDIF.

    *************************

    * Call MAINTAIN-API:

       CALL FUNCTION 'COM_PRODUCT_UI_MAINTAIN'

         EXPORTING

           is_product     = ls_product

           is_set         = lt_set

         IMPORTING

           et_bapireturn  = lt_bapireturn

         EXCEPTIONS

           internal_error = 1

           OTHERS         = 2.

       IF sy-subrc <> 0.

         MESSAGE ID sy-msgid TYPE 'X' NUMBER sy-msgno

                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

       ENDIF.


    Hope this helps. Wish you a wonderful New Year 2015.


    Thanks,

    Samantak Chatterjee.

    Add comment
    10|10000 characters needed characters exceeded