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

need to convert all hard coding to text element

Former Member
0 Likes
2,932

HI,

I have few include programs.Those are being called by many main programs.

Now requirement is to convert all hard coding messages to text elements in include programs.

We can do it manually,means create text element for each main program one by one.

Please suggest any better way.

Thanks,

Nikhil

HI,

I have few include programs.Those are being called by many main programs.

Now requirement is to convert all hard coding messages to text elements in include programs.

We can do it manually,means create text element for each main program one by one.

Please suggest any better way.

Thanks,

Nikhil

16 REPLIES 16
Read only

Former Member
0 Likes
2,299

Hey,

Sad but this is the only way of creating text elements for the programs.

Read only

0 Likes
2,299

Hey ,

Can't we create a message class for our text elements so when it's called by any program .it will, use that message class.BY this way may we can avoid rework.

please suggest any better idea

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,299

Hi,

When you create a message class, you display message using:-


MESSAGE e001.

I dont think we can assign the text using this approach.

However, i think using text-elements is the only approach to avoid hard-coded text...

Regards,

Tarun

Read only

0 Likes
2,299

Text element are maintained against program.

In Tcode: SE32 - Text Elements

you can use copy option to copy text elements of one program to another program.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,299

Hi,

Yes, it's the only good option..Go for it dude..

Regards,

Tarun

Read only

Former Member
0 Likes
2,299

s, you need to create text elements .

Read only

kamesh_g
Contributor
0 Likes
2,299

Hi

YOU can double click on text and it will prompt pop up of creating text element .

you can press YES to create text element .

it is the only easy option to create text elements .

Read only

Former Member
0 Likes
2,299

when i double click..it also prompt for main programs.I need to select main prog ..then it will create..

My problem is , I have around 40 main program for include.I this case i need to click again n again and create.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,299

Hi,

To create text-elements you need to double click and create one --> give text --> activate and come back --> again double click and follow same steps for all.

Or else you can see the number of text-elements used and simply give text in one go and activate.

Hope you get it.

Regards,

Tarun

Read only

Former Member
0 Likes
2,299

hey Dude,

problem is not the way I need to create..I just wanted to know any better way to create to avoid rework by developer.

If u do it one by one and for every program ,...that is any how the last option available.

Read only

Former Member
0 Likes
2,299

Hi Nikhil,

Please go through the document on [Insert Text pool|http://help.sap.com/abapdocu/en/ABAPINSERT_TEXTPOOL.htm]. Try to get the hard coded values by performing a scan on the report and I think you can implement the Insert Text-pool statement as soon as you capture all hard coded values. But I surely say that it is 100% possible.

Regards,

Swapna.

Read only

0 Likes
2,299

@ nagaswapna..

How to perform scan on program to find out hardcoding

Read only

Former Member
0 Likes
2,299

Hi Nikhil,

The documentation mentioned above by Swapna (Insert Text pool) shows you how to read the text pool for one program and change it then write it back. You can adapt the example program given in the documentation to copy the complete text pool from one program to another.

The documentation for [READ REPORT|http://help.sap.com/abapdocu/en/ABAPREAD_REPORT.htm] shows how to access the program to scan the contents. If you want to be sophisticated you can read the text pool, make a table of the texts, and scan the program table for the automatically.

Ed

Edited by: Ed Holden on Mar 9, 2009 8:05 AM

Read only

Former Member
0 Likes
2,299

Hi Nikhil,

You can use message class also and text element also .

Regards

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,299

Hi @Rajendra kumar ,

>

> Hi Nikhil,

>

> You can use message class also and text element also .

>

> Regards

If you write :-


p_text = text-001.

Then how can you assign text from message class into p_text

Can you please explain.

Regards,

Tarun

Edited by: Tarun Gambhir on Mar 9, 2009 12:43 PM

Read only

Former Member
0 Likes
2,299

thanks