cancel
Showing results for 
Search instead for 
Did you mean: 

I am geting Exception type CX_SY_DYN_CALL_ILLEGAL_TYPE

Former Member
0 Kudos

Hi,

when i am trying to creat sales order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' in BSP program iam geting the following exception.

An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was neither handled locally, nor declared in a RAISING clause

Exception Class: CX_SY_DYN_CALL_ILLEGAL_TYPE

Error Id:

Program: CL_O2AXZG4R3LD7CRXUAEKYMRHCDL8CP

Include: CL_O2AXZG4R3LD7CRXUAEKYMRHCDL8CM007

Line: 78

Long Text

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nagaraju,

The Type Definitions while using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' should be as follows:

1.)BAPI header type:

types : order_header_in_struc1 type bapisdhead.

2.)BAPI Item row type for Ordered Material and Ordered Quantity.

types : order_items_in_tab1 type table of bapiitemin.

3.)BAPI Item table type for Ordered Material and Ordered Quantity.

types : order_items_in_tab2 type bapiitemin.

4.)BAPI row type for Partner Details.

types : order_partners_tab1 type table of bapipartnr.

5.)BAPI table type for Partner Details.

types : order_partners_tab2 type  bapipartnr.

6.)For Sales Document Number

types : sales_doc_number1 type bapivbeln-vbeln.

7.)For return type.

types : RETURN1 type  BAPIRETURN1 .

These types should be strictly follwed or else this exception is thrown.

Regards,

Ravikiran.C

eddy_declercq
Active Contributor
0 Kudos

Hi,

Pls don't forget to reward points and close the question if you find the answers useful.

Eddy

former_member196065
Participant
0 Kudos

Hi Nagaraju,

Check this thread

/message/463412#463412 [original link is broken]

If not check the parameters what your are passing to to the bapi

Former Member
0 Kudos

hi ,

thank you,

i sent the data same as, the data which i tried to creat a sales order using same BAPI in normal SE38 program, at that time it created the sales order. but when i am tried to send the same data for same BAPI in BSP program it is not supporting and giving the exception.

eddy_declercq
Active Contributor
0 Kudos

Hi,

Are you 100% sure that all structures/tables and parameters in the BSP have the same types as needed for the BAPI? They should have an exact match.

If somet types are not supported in BSP environment, you should try to solve it with a CHAR or NUM type with the same size. If that isn't feasable, you should create your own types and domains via SE11.

Required parameters can't be left out either.

Eddy

Former Member
0 Kudos

Hi,

Thank you,

i had same types as bapi required but still it is not creating the sales order and giving that error

eddy_declercq
Active Contributor
0 Kudos

Hi,

Did you already tried debugging in order to see in what statement it fails?

Eddy

athavanraja
Active Contributor
0 Kudos

did you check ST22 for dump details.

Regards

Raja