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

TEXT ELEMENTS

Former Member
0 Likes
1,016

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)

1 ACCEPTED SOLUTION
Read only

SimoneMilesi
Active Contributor
0 Likes
959

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.

6 REPLIES 6
Read only

SimoneMilesi
Active Contributor
0 Likes
960

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.

Read only

0 Likes
959

Thank you! the problem is solved!

Read only

Former Member
0 Likes
959

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

Read only

Former Member
0 Likes
959

Hi Ashish,

Try this,

lv_text1 = text-000

Regards,

Sunil kairam.

Edited by: sunil kairam on Jun 16, 2009 1:16 PM

Read only

Former Member
0 Likes
959

can use this fm RS_TEXTPOOL_READ

Read only

Former Member
0 Likes
959

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