Hi,
I think the dump may be because you can concatenate only character field.
Check this.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/concaten.htm
I think UR Overwriting a protected field.
The following objects are protected:
- Character or numeric literals,
- Constants (CONSTANTS),
- Function module and method parameters with the type IMPORTING
REFERENCE,
- Untyped field symbols to which a field has not yet been assigned
using ASSIGN,
- TABLES parameters, if the corresponding actual parameter is protected
against changes,
- USING reference parameters and CHANGING parameters in FORMS, if the
actual parameter is protected against changes,
- Field symbols, if the field assigned using ASSIGN is protected against
changes,
- External write access to attributes with the READ-ONLY property.
Write like this :
data : v_10(100) type c.
Assign v_10 to <f1>.
u can use liek tht but before using this the field symbols must be assigned to some variable..otherwise it wil give u dump..
see demo code -
data: name like p0002-vorna,
nachn like p0002-nachn,
f_name(40).
parameter pernr like pernr-pernr.
field-symbols <fs_name> type any.
field-symbols <fs_name1> type any.
field-symbols <fs_name2> type any.
start-of-selection .
assign name to <fs_name>.
assign nachn to <fs_name1>.
select single vorna nachn into (<fs_name>,<fs_name1>) from pa0002
where pernr = pernr.
assign f_name to <fs_name2>.
concatenate <fs_name> <fs_name1> into <fs_name2>.
write: 'Name: ' ,<fs_name2> .
i dont know whether this will solve your problem or not?
first check whether the field symbols are of type c or not?
then concatenate the value to a character field and then assign the value into <f1>.
may be there is some assignment problem to the fieldsymbol but i am not sure.
regards
shiba dutta
Add a comment