2009 Jun 04 5:51 AM
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..
2009 Jun 04 6:03 AM
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
2009 Jun 04 6:11 AM
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
2009 Jun 04 6:12 AM
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...
2009 Aug 19 5:58 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |