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: 

short dump while assigning field symbol

Former Member
0 Kudos

Hi all,

Please see below lines of code-

field-symbols: <fs_vbap_ukie> type VBAP.

loop at DXVBAP assigning <fs_vbap_ukie> .

<processing>

endloop.

at start of the loop field symbol <fs_vbap_ukie> is not getting assigned and I am getting the erros as

You attempted to assign a field to a typed field symbol,

but the field does not have the required type.

Please suggest how to fix this error.

Thx

Saurabh

7 REPLIES 7

Former Member
0 Kudos

Hi,

Are you sure tha DXVBAP type is VBAP??

Go to standard program and check the correct type for table DXVBAP, i think correct type is vbapvb.

Regards,

Edited by: Jose Vaquero Polonio on May 11, 2009 11:20 AM

Former Member
0 Kudos

Hi,

Try doing like this field-symbols: <fs_vbap_ukie> type ANY.

Regards,

Suneel G

Former Member
0 Kudos

Type of <fs_vbap_ukie> should same as type of DXVBAP.

Else declare <fs_vbap_ukie> as type ANY.

Regards,

Tejas Naik.

0 Kudos

Hi,

DXVBAP and <fs_vbap_ukie> are of not the same type. This results in the dump.

Regards,

Ankur Parab

Former Member
0 Kudos

Hi,

The field symbol u defined is not similar to internal table

Define fieldsymbol of type any that will solve the pbm

Regards,

Naveen M.

Former Member
0 Kudos

thx.

Former Member
0 Kudos

REPORT demo_field_symbols_stat_assign .

FIELD-SYMBOLS: <f1> TYPE ANY, <f2> TYPE i.

DATA: text(20) TYPE c VALUE 'Hello, how are you?',

num TYPE i VALUE 5,

BEGIN OF line1,

col1 TYPE f VALUE '1.1e+10',

col2 TYPE i VALUE '1234',

END OF line1,

line2 LIKE line1.

ASSIGN text TO <f1>.

ASSIGN num TO <f2>.

DESCRIBE FIELD <f1> LENGTH <f2> IN CHARACTER MODE.

WRITE: / <f1>, 'has length', num.

ASSIGN line1 TO <f1>.

ASSIGN line2-col2 TO <f2>.

MOVE <f1> TO line2.

ASSIGN 'LINE2-COL2 =' TO <f1>.

WRITE: / <f1>, <f2>.

Regards ,

Venkat