1 1 1 1 1 Rating 0% (0 Votes)

EMPHASIZE allows you to change the colour of the whole column if there is such need.

This field can be filled with following values:

  • Space - this means you use the standard behaviour of ALV grid
  • ‘X’ – you use standard emphasize (default colour)
  • ‘Cxyz’ – where:
    •  ‘C’ is a character that notifies ALV grid that you will use specific colours
    • x – contains one of the following colour numbers:
      • 0 - background colour
      • 1 - blue
      • 2 - gray
      • 3 - yellow
      • 4 - blue/gray
      • 5 - green
      • 6 - red
      • 7 - orange  
    • y – is saying if the colours are intensified (‘1’) or not (‘0’)
    • z – is saying if the colours should be inverted (‘1’) or not (‘0’)

 

 

Figure 59 ZDEMO_AIN_CL25 Emphasize set for columns

 

 

Figure 60 ZDEMO_AIN_CL25 Results of column colouring

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

If you are familiar with the WRITE statement, then probably you know the EDIT_MASK addition which allows us to do formatting of the output in two different ways, you can apply the same to the EDIT_MASK of field catalog as well.

  1. Using Conversion-Exit, for example ‘==ALPHA’, where ‘==’ sings represents the information that we’re using conversion-exit, and the next 5 characters are reserved for the conversion-exit name.
     
  2. Using manual mask, where you can use following possibilities:
     
    1. Each underscore character (‘_’) in the mask will be replaced by the characters of the source field
       
    2. ‘LL’ on the beginning of the mask means that the underscore characters of the mask (“_”) will be replaced starting from left side, for example mask ‘LL__:__’ for value 123 will be displayed as ‘12:3 ’.
       
    3.  It’s also default setting for the mask so no need to use it in fact.
       
    4. ‘RR’ on the beginning of the mask means that the underscore characters of the mask will be replaced starting from the right side, for example mask ‘RR__:__’ for value 123 will be displayed as ‘ 1:23’.
       
    5. ‘V’ in case of quantity or amount fields is a place where the sign of the number should be displayed, for example mask ‘V__,__’ for number -1234 will be shown as ‘-12,34’.
       
    6. Any other characters will remain unchanged, means you can also build some extraordinary outputs, for example mask ‘Flight Number is: ____’ for the SFLIGHT-CONNID field will bring following result: ‘Flight Number is: 0017’.

Figure 53 ZDEMO_AIN_CL24 hardcoded edit_mask

Add a comment
Read more ...

1 1 1 1 1 Rating 0% (0 Votes)

When you set this field to ‘X’ then data will be display without using convertion exit that is assigned to the reference field. This setting works when you have REF_FIELD and REF_TABLE filled in fieldcatalog or when CONVEXIT field is filled. This setting is useful when you want to display internal values that are stored in database.

 

Figure 51 ZDEMO_AIN_CL23 Language with Convertion Exit

 

Figure 52 ZDEMO_AIN_CL23 Language without Convertion Exit

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

This setting is usable when we don’t want to display values that are equal 0. It works for numeric fields. I use this setting for better visibility of data in the grid. To use it set value of this field to ‘X’.

 

Figure 49 ZDEMO_AIN_CL22 NO_ZERO field empty

 

Figure 50 ZDEMO_AIN_CL22 NO_ZERO field set to 'X'

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

This field is responsible for setting up columns in proper order while displaying the grid without using of saved layout. It may be useful if you don’t allow your users to save their own or global grid layouts, so then the grid looks always the same for them. Personally I leave this almost always empty, but if needed just simply use INTEGER values to setup correct sorting. The demo program that can be found in Figure 11 can be used to see the difference between standard sorting and own one. 

 

Figure 11 ZDEMO_AIN_CL05 COL_POS

 

Own sorting firstly takes care about positions of columns from field catalog, then it displays the rest. If I would not pass parameter I_STRUCTURE_NAME then only this fields which are in table FCAT would appear on the screen.

 

Figure 12 ZDEMO_AIN_CL05 Own Sequence

 

 

Figure 13  ZDEMO_AIN_CL05 Standard sequence

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

This field is one of the basic ones in field catalog. It contains the fieldname of internal table that will be used in our grid. Although LVC_T_FCAT is standard table, then this field should be treated as key field, as in fact it is. If you fill this field manually, then please remember to put the field names in UPPER CASE.

You have to also remember that if field catalog will not contain all fields from the table and you don’t pass the dictionary name to parameter I_STRUCTURE_NAME of SET_TABLE_FOR_FIRST_DISPLAY method, then it will only display this fields, which are in field catalog. 

In Figure 14 you can see that, the field catalog is created manually with only field names inside. I also do not pass I_STRUCTURE_NAME parameter, so then only field catalog will be used to prepare the display of internal table. As I haven’t filled anything in there beside the name of the field, the output will be really poor. We will have data displayed in our grid, but without any descriptions in header, without any formatting or search helps.

 

 

Figure 14 ZDEMO_AIN_CL06 Field catalog with only field names

 

Figure 15 ZDEMO_AI_CL06 Results

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

The name of this field suggest to put here an internal table name, but it seems that it has no function at all. When SAP fills field catalog automatically, then value of this field is set to ‘1’. You can completely omit this field, as if you fill it then nothing will happen, even if you use different values for each field in field catalog.

Figure 16 ZDEMO_AIN_CL07 Tabname filled

Add a comment

1 1 1 1 1 Rating 0% (0 Votes)

When you have a field that contains an amount, for example net value of an sales order, then in order to show it correctly in the grid you should fill or this field with an value of currency key (one of entries from TCURC table). You can leave this field of course empty and in many case you will, especially if you use CFIELDNAME instead. 

In many situations changing the of currency here will not make difference to the output, but there are some exceptions, for example JPY (Japanese Yen) don’t have decimal places. Figure 17 displays value of 42 294 whereas the internal value of field is 422,94. If we use ZDEMO_AIN_CL08 program with USD currency then as you seen in Figure 18, the value shown is equal to 422,94. Both outputs are correct as long as the currency of the corresponding line is the same as in field catalog.

 

Figure 17 ZDEMO_AIN_CL08 Output using JPY


Figure 18 ZDEMO_AIN_CL08 Output using USD

 

That’s why the CFIELDNAME is very handy to use in that situations where you have different currencies for different rows.

Add a comment
Page 1 of 4

ABAP Favorites Eclipse plugin

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client