‎2013 Jul 03 10:39 AM
Hi,
I am creating a customer master information using module pool. Now I want to record customer data using function module.
but I am facing below dump.
DUMP:
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', wa
not caught in
procedure "BAPI" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The call to the function module "ZBAPI_CUSTOMER_NEW" is incorrect:
The function module interface allows you to specify only
fields of a particular type under "INCO1_069".
The field "WA_MASTER-INCO1" specified here is a different
field type
MODULE user_command_1000 INPUT.
CASE ok_code.
WHEN 'SAVE'.
PERFORM get_mino CHANGING wa_master-mino.
wa_master-ernam = sy-uname.
wa_master-erdat = sy-datum.
* PERFORM bapi.
INSERT zcust_master FROM wa_master.
PERFORM bapi.
IF sy-subrc EQ 0.
PERFORM save_dlno.
MESSAGE s000(zmsg) WITH wa_master-mino.
CLEAR wa_master.
ENDIF.
WHEN 'DLNO'.
PERFORM edit_control.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
FORM bapi .
CALL FUNCTION 'ZBAPI_CUSTOMER_NEW'
EXPORTING
ctu = 'X'
mode = 'N'
update = 'L'
* group = user
* keep = holddate
nodata = '/'
bukrs_001 = wa_master-bukrs
vkorg_002 = wa_master-vkorg
vtweg_003 = wa_master-vtweg
spart_004 = wa_master-spart
ktokd_005 = wa_master-ktokd
* USE_ZAV_006 = 'X'
title_medi_007 = wa_master-title_medi
name1_008 = wa_master-name
name2_009 = wa_master-name2
sort1_010 = wa_master-sort1
street_011 = wa_master-street
str_suppl3_012 = wa_master-str_suppl3
location_013 = wa_master-location
* city2_014 = wa_master-city2
post_code1_015 = wa_master-post_code1
city1_016 = wa_master-city1
country_017 = wa_master-country
region_018 = wa_master-region
langu_019 = wa_master-langu
tel_number_020 = wa_master-tel_number
mob_number_021 = wa_master-mob_number
fax_number_022 = wa_master-fax_number
smtp_addr_023 = wa_master-smtp_addr
* DEFLT_COMM_024 = 'INT'
j_1iexcd_025 = wa_master-j_1iexcd
j_1iexrn_026 = wa_master-j_1iexrn
j_1iexrg_027 = wa_master-j_1iexrg
j_1iexdi_028 = wa_master-j_1iexdi
j_1iexco_029 = wa_master-j_1iexco
j_1icstno_030 = wa_master-j_1icstno
j_1ilstno_031 = wa_master-j_1ilstno
j_1isern_032 = wa_master-j_1isern
j_1ipanno_033 = wa_master-j_1ipanno
* j_1ipanref_034 = wa_master-j_1ipanref
* TIME_ZONE_047 = 'INDIA'
* BEGRU_054 = 'CORP'
* CIVVE_055 = 'X'
* AKONT_056 = wa_master-akont
* ZUAWA_057 = '001'
* KNRZE_058 = ''
* fdgrv_059 = wa_master-fdgrv
* VZSKZ_060 = 'H4'
zterm_061 = wa_master-zterm
** AWAHR_062 = '100'
* waers_063 = wa_master-waers
** KALKS_064 = '1'
** VERSG_065 = '1'
** KZAZU_066 = 'X'
** VSBED_067 = '01'
** ANTLF_068 = '9'
inco1_069 = wa_master-inco1
* inco2_070 = wa_master-inco2
* zterm_071 = wa_master-zterm
* ktgrd_072 = wa_master-ktgrd
* TAXKD_01_073 = '0'
* TAXKD_02_074 = '0'
* IMPORTING
* subrc = it_master
TABLES
messtab = it_master.
Regards
Kalpana
‎2013 Jul 03 10:46 AM
Hi,
It does mean the data type of wa_master-inco1 is different from the data type of variable inco1_069 defined in BAPI. Check and change the data type accordingly. But then it is easy to pass values when you define a z-structure and call it in BAPI rather than creating a individual import parameter in FM.
Regards,
Swarna
‎2013 Jul 03 11:01 AM
Hi Kalpana,
Pls check Account group what your passing is correct or not.
Regards,
Krishna
‎2013 Jul 03 11:32 AM
Make sure that you use same data type for wa_master-inco1in your program as used for BAPI parameter INCO1_069.
Regards
‎2013 Jul 03 1:42 PM
‎2013 Jul 04 7:43 AM
Incoterm 1 should be - KNVV-INCO1 char 3 (alphanumeric type)
Incoterm 2 should be - KNVV-INCO2 char 28 (alphanumeric type)