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: 

Parameters picking up long field label from the data element

former_member474221
Participant
0 Kudos

Hi experts,

I have the following code -

Parameters : temp type zmat

Where data element zmat has a domain ( char 8 )

zmat has the following field label lengths

10 ...mat

15 ...material

20...materiallll

Here i have specified the selection text to be used from dictionary ....

However the parameters on screen always comes with "Materialll" 

What is logic behind the selection screen always using the field label with length 20.

1 ACCEPTED SOLUTION

mayur_priyan
Active Participant
0 Kudos

Hi,

It is seen that the system automatically inserts the short texts from the ABAP Dictionary for your selection texts whose Dictionary indicator is set.

Source:

http://help.sap.com/saphelp_nwpi71/helpdata/en/e3/960a0beb0711d194d100a0c94260a5/content.htm

12 REPLIES 12

Former Member
0 Kudos

the easiest is going into the menu of the report / goto / selection texts, place your cursor on the field which you checked for the meaning of "with reference" and press F1. You will find the answer there.

mayur_priyan
Active Participant
0 Kudos

Hi,

It is seen that the system automatically inserts the short texts from the ABAP Dictionary for your selection texts whose Dictionary indicator is set.

Source:

http://help.sap.com/saphelp_nwpi71/helpdata/en/e3/960a0beb0711d194d100a0c94260a5/content.htm

former_member187692
Participant
0 Kudos

Hi Hema,

               After looking at your question, I tried to get the different names given field label to appear ( I have create a Employee table with 3 fields and have called them in SE51 ) .

Screen painter is a great place if we want to do some trail and error with our own tables.

I noticed that while entering the table fields from from SE51-> layout -> Goto-> secondary window -> dictionary fields ------> the system gives us an option to select which type of text ( whether short, medium, long or header ) to be displayed. By default the control is on long/medium text generally.

PS:- I am still doing a bit of experiment in SE51 to understand it better. I suggest you do the same.

Regards,

Krishna.

0 Kudos

Hi experts,

I need to understand this more better..I went through the F1 help but it was not descriptive

when we define the below field labels in Data element . Which text will be picked if the length of the field is say 14 chars...will it be "mat" or  " material"

i tried this and found out that if the output length is 13 char it picks up "mat" and if the length is 14 it picks up "material"

I mean what is the logic ?

10 ...mat

15 ...material

20...materiallll

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Hema,

According to F1 help of "Dictionary ref", the long lable is always used first . If long lable is not available then system uses short description.

Thanks

0 Kudos

If the long text is not available then it gets the text from data element description.

So for the field labels the systems has an order of fetching the SELECTION TEXT:-

1.) field label - long text

2.) data element description.

0 Kudos

ok but apart from selection text ....

what is the significance of the following lengths

10 ...mat

15 ...material

20...materiallll

What will happen if in a ALV grid display the output length is 14 will it pick text as "mat" or "material"

0 Kudos

your question was about the selection screen text. Wasn't it clearly explained xy times in this post? If you do want to understand the meaning of all the texts and their use in different occasions, why not search for the answer first?

e.g. the ALV will display the text according to different settings you make to the ALV itself - either fixed column widths and so on. If you enlarge the width of the column, ALV will show the larger text. You can however change the default text there too.

0 Kudos

Hi,

Source: help.sap.com


For fields with Data Dictionary reference, the system automatically adopts the field labels of the corresponding data elements. The texts for the short, medium, and long field labels as well as for the heading are copied into the fields SELTEXT_S , SELTEXT_M , SELTEXT_L , and REPTEXT_DDIC of the field catalog.


There are several possibilities how the ALV Grid Control assigns text to a column:

  • If no other text is specified, the text copied from the Data Dictionary is used. The ALV Grid Control chooses the long field label ( SELTEXT_L ) as text in the popup column selection. The column heading is dynamically adjusted to the column width even if the user changes the column width. The ALV Grid Control always uses the longest DDIC text that still fits into the column.

  • If field DDICTXT of the field catalog is not empty, the field determines the field label that is to be displayed as the column heading. The value range of this field is as follows: SPACE , ' L ', ' M ', ' S ', and ' R '.



raymond_giuseppi
Active Contributor
0 Kudos

Most SAP internal code will try use the longest ddic description text available which is shorter or equal to available length. Same behavior is expected for parameters selection-text, dynpro text, ALV header, etc. That is the reason why SAP provided 3 different texts in data element description.

Of course a rule has always exceptions, and SAP provided creative developers options to change thus behavior...

Regards,

Raymond

0 Kudos

Hi Raymond,

Thanks for a useful answer...so based on your explanation

if the length of a field is say 16 which is based on below data element ..it will always pick up the text as "material"

and if the length of the field is 14 it should  pick up the text as "mat" ??

10 ...mat

15 ...material

20...materiallll

0 Kudos

Correct.