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

Field symbol type problem

Former Member
0 Likes
734

Deal All,

i am using field symbol here,while trying to assign the character value into field smybol.

It is generating the error.cannot be converted into number ..so wht should be the type of the field symbol.

field-symbol : <RATING> TYPE ANY.

CONCATENATE 'wa_final1-f' V_COUNT INTO V_FIELD.

CONDENSE V_FIELD.

ASSIGN (V_FIELD) TO <RATING>.

WRITE WA_FINAL-RATING1 TO V_PAK .

<RATING> = V_PAK. "ERROR GENERATING HERE WHILE ASSIGNING VALUE OF V_PAK TO <RATING>

VALUE OF V_PAK = 'DME' ( I.E CHARACTER FIELD).

thanks in advance..

Deal All,

i am using field symbol here,while trying to assign the character value into field smybol.

It is generating the error.cannot be converted into number ..so wht should be the type of the field symbol.

field-symbol : <RATING> TYPE ANY.

CONCATENATE 'wa_final1-f' V_COUNT INTO V_FIELD.

CONDENSE V_FIELD.

ASSIGN (V_FIELD) TO <RATING>.

WRITE WA_FINAL-RATING1 TO V_PAK .

<RATING> = V_PAK. "ERROR GENERATING HERE WHILE ASSIGNING VALUE OF V_PAK TO <RATING>

VALUE OF V_PAK = 'DME' ( I.E CHARACTER FIELD).

thanks in advance..

4 REPLIES 4
Read only

Former Member
0 Likes
661

Hi,

The statement ASSIGN (V_FIELD) TO <RATING> will assign the type of whatever you have in V_field to the field-symbol. Incase it is an integer it will be of type i. So you will get an error while passing a character value to an integer field.

You will have to keep the variables of the same type only.

Regards,

Ankur Parab

Read only

Former Member
0 Likes
661

field-symbol : <RATING> TYPE ANY.

CONCATENATE 'wa_final1-f' V_COUNT INTO V_FIELD.

CONDENSE V_FIELD.

ASSIGN (V_FIELD) TO <RATING>.

WRITE WA_FINAL-RATING1 TO V_PAK .

UNASSIGN <RATING>.

ASSIGN V_PAK TO <RATING>.

Edited by: vijetasap on Jun 4, 2009 7:11 AM

Read only

Former Member
0 Likes
661

wa_final1-fxx and V_PAK are to be of same type..

a v_pak is of type char...wa_final1-fxx have t be of sae type...

I guess wa_final1-fxx is of type int...so the problem...

Read only

Former Member
0 Likes
661

thanks a lot