Application Development 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: 

ASSIGN_CASTING_ILLEGAL_CAST for FM 'F4IF_INT_TABLE_VALUE_REQUEST'

Former Member
0 Kudos

Hi,

I'm using FM 'F4IF_INT_TABLE_VALUE_REQUEST' to get f4 help on selection screen.

When i do a select query,and assign the value to the VALUE_TAB parameter in the FM there is a short dump ASSIGN_CASTING_ILLEGAL_CAST (Exception CX_SY_ASSIGN_CAST_ILLEGAL_CAST ) .

Below is the code that i have implemented. Please do let me know how i can get this working?



AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_delmet-low.


SELECT TFORMP FROM LSOTFORMP_C INTO TABLE t_tformp
                             WHERE schedule_dep = 'X'.

  SELECT tform FROM LSOTFORM_C INTO TABLE t_tform
                             FOR ALL ENTRIES IN t_tformp
                             WHERE TFORMP = t_tformp-tformp.

  SELECT TFORM TXTSHORT FROM LSOTFORMT_C INTO TABLE T_TFORMtxt
                             FOR ALL ENTRIES IN T_TFORM
                            WHERE TFORM = T_TFORM-T_FORM AND
                                  SPRAS  = sy-langu.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'S_DELMET-LOW'
      DYNPPROG        = SY-REPID
      DYNPNR          = SY-DYNNR
      DYNPROFIELD     = 'S_DELMET-LOW'
      value_org       = 'S'
    TABLES
      value_tab       = t_tformtxt
      return_tab      = t_return1
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.

2 REPLIES 2

Rushikesh_Yeole
Contributor
0 Kudos

please check the value_tab declaration

it should be something like this

Value_tab = SORT_SER_TAB

DATA: BEGIN OF SORT_SER_TAB OCCURS 3,

TEXTLINE TYPE FIELDTEXT,

END OF SORT_SER_TAB.

former_member195402
Active Contributor
0 Kudos

Hi,

I think there may be a problem using SY-REPID and SY-DYNNR. Maybe that's not the reason for the dump, but you shold take literals or constants for calling the FM.

Regards,

Klaus