Skip to Content
0
Former Member
Apr 29, 2015 at 01:47 PM

Dump ASSIGN_TYPE_ILLEGAL_CAST search help exit

120 Views

Hi,

Below code throwing dump 'ASSIGN_TYPE_ILLEGAL_CAST'.

Actually I am trying to increase field size in search help.

DATA: ls_fielddescr TYPE dfies, "loc str for shlp-fielddescr

ls_selopt TYPE ddshselopt . "loc str for shlp-selopt

* data: it_shlp type SHLP_DESCR,

* wa_shlp like line of it_shlp.

*Local structure for itab record_tab

DATA: BEGIN OF ls_record.

INCLUDE STRUCTURE seahlpres.

DATA: END OF ls_record.

DATA: ls_name1 TYPE name1_gp,

ls_start TYPE string,

ls_end TYPE string,

v_kunnr TYPE kunnr.

*Internal table to store Customer Name

DATA: BEGIN OF gt_kna1 OCCURS 0,

kunnr LIKE kna1-kunnr,

name1 LIKE kna1-name1,

END OF gt_kna1.

RANGES: lr_kunnr FOR kna1-kunnr. "Ranges for customer number

CHECK callcontrol-step = 'DISP'.

LOOP AT shlp-fielddescr INTO ls_fielddescr.

CASE ls_fielddescr-fieldname.

WHEN 'KUNNR'.

ls_fielddescr-intlen = ls_fielddescr-outputlen = 45.

MODIFY shlp-fielddescr FROM ls_fielddescr INDEX sy-tabix.

WHEN 'ERNAM'.

ls_fielddescr-offset = 60.

MODIFY shlp-fielddescr FROM ls_fielddescr INDEX sy-tabix.

WHEN 'ERDAT'.

ls_fielddescr-offset = 66.

MODIFY shlp-fielddescr FROM ls_fielddescr INDEX sy-tabix.

WHEN 'VBELN'.

ls_fielddescr-offset = 72.

MODIFY shlp-fielddescr FROM ls_fielddescr INDEX sy-tabix.

ENDCASE.

ENDLOOP.


BR

Sumeet

Attachments

issue.png (30.5 kB)