‎2009 Jun 16 8:33 AM
Hello All,
I have a variable which contains the TEXT ELEMENTS name i need to pass the content of the text element into another variable.
Is there any way to do this?
Can this be done using field symbols?
EX: lv_text CONTAINS 'TEXT-000'.
I want the content of the text element TEXT-000 to be passed into another variable (lv_text1)
‎2009 Jun 16 8:44 AM
Use FIELD-SYMBOLS
FIELD-SYMBOLS: <fs>.
assign the contents of TEXT-ELEMENT to the field symbols.
ASSIGN (lv_text) to <fs>.
now <fs> contains not TEXT-000 but what TEXT-000 contains.
lv_text1 = <fs>.
I hope it's cleare. Try this and let me know.
‎2009 Jun 16 8:44 AM
Use FIELD-SYMBOLS
FIELD-SYMBOLS: <fs>.
assign the contents of TEXT-ELEMENT to the field symbols.
ASSIGN (lv_text) to <fs>.
now <fs> contains not TEXT-000 but what TEXT-000 contains.
lv_text1 = <fs>.
I hope it's cleare. Try this and let me know.
‎2009 Jun 16 9:44 AM
‎2009 Jun 16 8:44 AM
Hi,
Use field-symbol for the same as follow:-
DATA : lv_text TYPE char8,
lv_text1 TYPE ITEX132.
field-symbols : <fs> type any.
lv_text = 'TEXT-001'.
assign (lv_text) to <fs>.
lv_text1 = <fs>.
IF sy-subrc EQ 0.
ENDIF.Regards,
Ankur Parab
‎2009 Jun 16 8:45 AM
Hi Ashish,
Try this,
lv_text1 = text-000Regards,
Sunil kairam.
Edited by: sunil kairam on Jun 16, 2009 1:16 PM
‎2009 Jun 16 8:47 AM
‎2009 Jun 16 9:18 AM
Hi Ashish,
YES, YOU CAN FILE DSYMBOLS FOR THIS.
CHECK THE BELOW SAMPLE CODE.
DATA : LV_TEXT(20),
LV_TEXT1(40).
FIELD-SYMBOLS : <FS> TYPE ANY.
LV_TEXT = 'TEXT-001'.
ASSIGN (LV_TEXT) TO <FS>.
LV_TEXT1 = <FS>.
Thanks & regards,
Dileep .C