Application Development 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: 
SAP Community Downtime Scheduled for This Weekend

TEXT ELEMENTS

Former Member
0 Kudos
135

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

SimoneMilesi
Active Contributor
0 Kudos
78

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

SimoneMilesi
Active Contributor
0 Kudos
79

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.

0 Kudos
78

Thank you! the problem is solved!

former_member555112
Active Contributor
0 Kudos
78

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

former_member202957
Contributor
0 Kudos
78

Hi Ashish,

Try this,

lv_text1 = text-000

Regards,

Sunil kairam.

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

Former Member
0 Kudos
78

can use this fm RS_TEXTPOOL_READ

Former Member
0 Kudos
78

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