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: 

Unused text

2,112

Hello,

I'm checking the simple report I have just written (on an ECC system). Accorting to ATC it is OK (The objects passed the chosen checks without any finding), while according to Extended program check I have some warnings:

The text symbol 01L from the text pool of ZMM_BI_MM02_MRP is not used.
Can be hidden using pragma ##TEXT_USE Message Code TXT 1706

This text is defined as a normal text symbol:

This text (and 7 more in the same condition) are called dynamically, so that's why the check is not able to find it.

Can I hide this warning by using pragma, as it is written in the message? And where should I put it?

Thank you for any reply

Guido

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert
659

I guessed correctly in my comment. Now I tried and it is also confirmed by the SLIN guys.

You can put that pragma into the REPORT/PROGRAM/... statement to suppress the warning.

11 REPLIES 11

horst_keller
Product and Topic Expert
Product and Topic Expert
659

Interesting finding. Have to ask the SLIN guys where to place that pragma, maybe after the PROGRAM|REPORT|... statement.

horst_keller
Product and Topic Expert
Product and Topic Expert
660

I guessed correctly in my comment. Now I tried and it is also confirmed by the SLIN guys.

You can put that pragma into the REPORT/PROGRAM/... statement to suppress the warning.

0 Kudos
659

Thank you for your reply.

Unfortunately I can't check it now, because this report is written for a customer that has no remote access to its SAP and now I'm elsewhere.

I tried to do something like this, but it didn't work. Maybe because of a mistake, I will try again.

In such way (if it works) this pragma should hide all warning about texts, it is not possibile to specify which should be checked and which not. This is not a problem in this case (my report is very simple and short), but it could be in some larger situation.

0 Kudos
659

Hi...

finally I'm able to check and I confirm...

According to ATC my program is OK (The objects passed the chosen checks without any finding), while according to Extended program check I still have warnings about texts, wherever I add the pragma ##TEXT_USE.

If I double click on the warning (shown in my first picture in my first post), the text Element screen is opened (the second picture in my first post), not ABAP code.

So I'm still NOT able to make this warning disappear and I wonder if it is possibile. It's not a problem now, it's just a curiosity for learning something new.

Thank for your reply

PS: just to avoid any misunderstaning, I tried to put pragma in some different location even if the one suggested by Horst Keller should be this one, that doesn't work:

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos
659

Hmm, I tested it and the SLIN warning did disappear. Maybe a bug that was corrected in a later release.

0 Kudos
659

Possibly... I'm still on an ECC system.

I should try on a newer release, but I can't do it now.

0 Kudos
659

works for class definition as well 🙂

omer_sakar
Participant
0 Kudos
659

Hi Guido,

There are lots of pragma can be used,but it should not be first option. You can contact person who finally check programs and it is understandable to put pragma because of the text dynamically called. To put pragma you should go to whereever(in most cases you should just double click ATC result expression line )you use text.

0 Kudos
659

Hello Omer,

thank for your reply. As I have just written to Horst, I can't check it now.

However: according ATC gives no warning, as shown in my original message the warning was given by Extended program check and a double click on the warning open the text symbol screen.

By the way... my customer has nobody that checks program... I could write a report using only obsolete statements and nobody would notice it. I can do whatever I want, but of course I want to improve myself and coding better and better.

Jelena_Perfiljeva
Active Contributor
0 Kudos
659

Slightly "out of the box" option - how is the text actualy used? I find many times people define a generic message (&1 &2 &3 &4) and then call it using text symbols in the program. That is not a good idea to begin with, so if that's your case then maybe just replace text symbol with a custom message and problem solved?

0 Kudos
659

Hi Jelena,

thank for your message, but we are "out of the box", I'm not using texts for displaying any message with MESSAGE (even if I have to be honest, sometimes I do like this).

In this case I have an ALV table an I need to replace standard column header with some different ones. I wrote a small routine: for each field I need to change, I call it with a data element or a number. If I call with a data element, texts are taken from table DD04T; if I call with a number, texts are taken from the corrispondent text in the current report.

Exact text name is dynamically built and then read on internal table filley by READ TEXTPOOL: text found is the used for changing long, medium and short description on ALV.

I hope I have been able to explain...