‎2007 Jul 23 8:40 PM
I am getting an error SR053 while testing a user exit . It says ' type conflict when calling a function module' . How do i correct this ? I searched for this error message number SR053 in main program of the include , its not found anywhere in the include.
‎2007 Jul 23 8:44 PM
‎2007 Jul 23 8:44 PM
‎2007 Jul 23 10:26 PM
Thanks Rich , I am checking the parameters to be passed for the BAPI . I am not sure how to use that bapi ?
‎2007 Jul 23 10:44 PM
Which BAPI is that and please post the call to that BAPI with the data definitions?
‎2007 Jul 23 10:46 PM
LOOP AT it_matkey INTO wa_matkey.
for all products transferred via CIF,
get the regional location associated with the product by joining the tables .
The regional location is maintained in the field attlo01 of /sapapo/loc table
SELECT single b~attlo01 INTO regloc
FROM /sapapo/matloc AS a INNER JOIN /sapapo/loc AS b
ON alocid = blocid
WHERE a~matid = wa_matkey-matguid.
Get locationguid of the regional location from table /sapapo/loc
SELECT single locid FROM /sapapo/loc
INTO locid
WHERE locno = regloc.
Check whether the product is extended to the new regional location by checking for the entry with the product and locationguid of the regional location
SELECT single matid locid FROM /sapapo/matloc
INTO (matguid, locguid)
WHERE matid = wa_matkey-matguid AND
locid = locid.
IF sy-subrc <> 0.
if the entry doesnt exists in the table then extend the product by calling the bapi and passing some default profiles
it_loc-product_id = wa_matkey-matguid.
it_loc-location_id = locid.
it_loc-planning_version = '000'.
CONCATENATE regloc '_LOT' INTO it_loc-lot_size_profile.
CONCATENATE regloc '_DEMAND' INTO it_loc-requirement_profile .
CONCATENATE regloc '_SNP_DMD' INTO it_loc-demand_profile .
CONCATENATE regloc '_SNP_SUPPLY' INTO it_loc-supply_profile.
CONCATENATE regloc '_SNP_DEPLOY' INTO it_loc-deployment_profile.
it_loc-procurement_type = 'E'.
append it_loc.
it_loc_verx-product_id = wa_matkey-matguid.
it_loc_verx-location_id = locid.
it_loc_verx-planning_version = '000'.
it_loc_verx-lot_size_profile = 'X'.
it_loc_verx-requirement_profile = 'X'.
it_loc_verx-demand_profile = 'X'.
it_loc_verx-supply_profile = 'X'.
it_loc_verx-deployment_profile = 'X'.
it_loc_verx-procurement_type = 'X'.
append it_loc_verx.
CALL FUNCTION 'BAPI_PRDSRVAPS_SAVEMULTI2'
EXPORTING
LOGICAL_SYSTEM = 'D14CLNT208'
SAVE_OPTIONS =
COMMIT_CONTROL =
BUSINESS_SYSTEM_GROUP =
TABLES
PRODUCT_HEAD =
PRODUCT_HEAD_X =
PRODUCT_TEXT =
PRODUCT_TEXT_X =
PRODUCT_ALT_UOM =
PRODUCT_ALT_UOM_X =
PRODUCT_PENALTY =
PRODUCT_PENALTY_X =
PRODUCT_LOCATION =
PRODUCT_LOCATION_X =
PRODUCT_LOCATION_VERSION = it_loc
PRODUCT_LOCATION_VERSION_X = it_loc_verx
PRODUCT_LOCATION_PENALTY =
PRODUCT_LOCATION_PENALTY_X =
PRODUCT_LOCATION_PRIORITY =
PRODUCT_LOCATION_PRIORITY_X =
PRODUCT_MODEL =
PRODUCT_LOCATION_TDPP =
RETURN = it_return
EXTENSION_IN =
PRODUCT_WAREHOUSE =
PRODUCT_WAREHOUSE_X =
PRODUCT_STORAGE_TYPE =
PRODUCT_STORAGE_TYPE_X =
PRODUCT_GROUP =
PRODUCT_SPP =
PRODUCT_SPP_X =
PRODUCT_LOCATION_SPP =
PRODUCT_LOCATION_SPP_X =
PRODUCT_LOCATION_INH =
PRODUCT_ALTERNATIVE_NUMBER =
.
read table it_return with key type = 'E'.
if sy-subrc <> 0.
.
CALL FUNCTION '/SAPAPO/DM_MODEL_ADD_PROD'
EXPORTING
I_MODEL = '000'
I_LOCID = locid
I_MATID = wa_matkey-matguid
TABLES
C_MATMOD_TAB =
EXCEPTIONS
NO_MODLOC = 1
NO_MATLOC = 2
ENTRY_ALREADY_EXISTS = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
refresh it_return.
refresh it_loc.
refresh it_loc_verx.
clear it_return.
clear it_loc.
clear it_loc_verx.
ENDIF.
ENDLOOP.
‎2007 Jul 23 10:47 PM
I dont know where the error is coming exactly , but i am thinking its error with the bapi .
‎2007 Jul 23 11:08 PM
This error comes when the variables you are passing to the function module call are not compatable to the parameters of the function module.
So check if "it_loc" is defined as "PRODUCT_LOCATION_VERSION" and "it_loc_verx" is defined as PRODUCT_LOCATION_VERSION_X. Similarly, make sure that every variable that you are passing to a function call follows the same rule as explained above.