Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting run time errors when passing values to bapi

Former Member
0 Likes
608

when I am passing values to bapi_loan_contract_create getting the following errors. How to send date fields of length to the date fields having only length 8

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was

not caught and

therefore caused a runtime error.

The reason for the exception is:

The call to the function module "BAPI_LOAN_CONTRACT_CREATE" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "CONDITIONHEADER".

Although the currently specified field

"IT_CONDITIONHEADER" is the correct type, its length is incorrect.

Missing Handling of System Exception

Program ZBAPILOAN

Trigger Location of Exception

Program ZBAPILOAN

Include ZBAPILOAN

Row 86

Module Name START-OF-SELECTION

56 WA_PARTNER-PARTNER = 'KUMARI'.

57 WA_PARTNER-ROLE_TYPE = 'TR0100'.

58 WA_PARTNER-ROLE_SBTYP = 'A100'.

59 WA_PARTNER-CUSTOMER = '100281'.

60 WA_PARTNER-DUNN_PAYER = 'X'.

61

62 APPEND WA_PARTNER TO IT_PARTNER.

63

64 WA_CONDITIONS-CONDITION_TYPE = '0261'.

65 WA_CONDITIONS-VALID_FROM = '01032008'.

66 WA_CONDITIONS-PERCENTAGE_RATE = '5'.

67 WA_CONDITIONS-CURRENCY = 'EUR'.

68 WA_CONDITIONS-CURRENCY_ISO = 'EUR'.

69 WA_CONDITIONS-CALC_DATE = '01032008'.

70 WA_CONDITIONS-DUE_DATE = '01042008'.

71

72 APPEND WA_CONDITIONS TO IT_CONDITIONS.

73

74

75 WA_CORRESPONDENCE-GENERFREQ = '1'.

76 WA_CORRESPONDENCE-PROCESSTYP = '1'.

77

78 APPEND WA_CORRESPONDENCE TO IT_CORRESPONDENCE.

79

80 WA_USERFIELDS-COMP_CODE = '1000'.

81 WA_USERFIELDS-USERFIELD1_AMNT = '100000'.

82 WA_USERFIELDS-USERFIELD1_CURR_ISO = 'USD'.

83 84 APPEND WA_USERFIELDS TO IT_USERFIELDS.

85

>>>>> CALL FUNCTION 'BAPI_LOAN_CONTRACT_CREATE'

87 EXPORTING

88 loan = IT_LOAN

89 conditionheader = IT_conditionheader

90 CORRESPONDENCE = IT_CORRESPONDENCE

91 USERFIELDS = IT_USERFIELDS

92 * TESTRUN = ' '

93 * REFRESH = ' '

94 * PROCESSEXTENSION = ' '

95 * STEERING =

96 IMPORTING

97 LOANNUMBER = IT_LOANNUM

98 ERROR = IT_ERROR

99 tables

100 partner = IT_PARTNER

101 conditions = IT_CONDITIONS

102 * FORMULA =

103 * OBJECTS =

104 * COLLATERALS =

105 * ENCUMBRANCES =

Advance thanks

Nagamani

4 REPLIES 4
Read only

Former Member
0 Likes
568

Hi,

Did u create the structure with all those fields in a structure.and then in tables declare itab like zstructure.I thought u got a error for this.try it.

Read only

0 Likes
568

Thank you for remembering. I am not created zstructures. I am directly using the bapi structures.

Read only

0 Likes
568

Hi,

You are passing WA_CONDITIONS-VALID_FROM = '01032008'.But the internal format of Date is YYYYMMDD.

Thank you,

Ahsan

Read only

Former Member
0 Likes
568

Hi Nagamani,

Did u get the solution for this problem.

Actually I am also getting the same error and not able to solve it.

I you have found the solution can u pls tell me how to resolve it.

Thanks.

Shruti