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

Dynamic Text Elemnt creation

Former Member
0 Likes
1,192

Hi All,

Is there any way to create the text elements dynamically in the report program.

Is there any Function Module or class to create the text elements dynamically.

This is very urgent.Please anybody help me.

Thanks,

Swapna

1 ACCEPTED SOLUTION
Read only

franois_henrotte
Active Contributor
0 Likes
851

use function EDIT_REPORT_TEXT to change texts

then

function SAVE_REPORT_TEXTS to save changes

6 REPLIES 6
Read only

franois_henrotte
Active Contributor
0 Likes
852

use function EDIT_REPORT_TEXT to change texts

then

function SAVE_REPORT_TEXTS to save changes

Read only

Former Member
0 Likes
851

Hi Franocis,

Thanks for u r reply.But these function Modules are for creating the text symbols.But i need to create the text elements.

Thanks,

Swapna.

Read only

0 Likes
851

OK then you do like this:

1) READ TEXTPOOL progname INTO itab.

2) modify your internal table itab (change, add, delete, entries as you need)

3) INSERT TEXTPOOL progname FROM itab.

You can also use addition LANGUAGE if you need to maintain texts in several languages.

Read only

Former Member
0 Likes
851

Hi,

Can you please give me some example.

Thanks,

Swapna

Read only

0 Likes
851

DATA: gt_texts TYPE TABLE OF textpool,
      gs_texts TYPE textpool.

READ TEXTPOOL 'YTESTFHE' INTO gt_texts.

gs_texts-id     = 'I'.        "I=Text symbols, S=Selection, R=Report title
gs_texts-key    = 'MYT'.
gs_texts-entry  = 'My text'.
gs_texts-length = 10.
APPEND gs_texts TO gt_texts.

INSERT TEXTPOOL 'YTESTFHE' FROM gt_texts.

if you ever want to learn something, try to find by yourself in documentation (at least F1 help on ABAP statements)