• Home
  • About me
  • FALV
  • ALV Grid in the nutshell
    • Basic Information
    • Field catalog
  • Articles
    • Tricks
    • FALV (Fast ALV Grid)
    • ALV Grid in the nutshell
    • Tips
    • How to...
    • For beginners
    • Thoughts
  • By Topic
    • ALV
    • ALV OO
    • SALV
    • GOS
    • Selection screen
    • Purchase Requisitions
    • Purchase Orders
    • Attachments
    • Others
    • Characteristics
    • Sample Programs
    • ZIP
    • OLE
    • Mails
    • Routings
    • EWB
    • Excel
  • Keywords
  • RSS
  • Download
  • Home

ALV Grid in the nutshell: Field catalog - tooltip

Details
Łukasz Pęgiel
ALV Grid in the nutshell
12 September 2019
Hits: 10043
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , TOOLTIP , ALV GRID

TOOLTIP, as in any other places in on your PC, is responsible to show short info about the column when you hover your mouse over the column header. It’s very useful when you have a lots of fields in you grid and you’re optimizing the width of the column by minimizing the description of the column itself. It is common behaviour for example for checkboxes or for icon columns. In this case the Tooltip is very helpful for explaining the user the meaning of the column.

Figure 81 ZDEMO_AIN_CL34 Tooltip of an column

 

 

Additionally if you’ll not use SELTEXT field, then the value from TOOLTIP will be used as description used to describe the column in the change layout screen.

Figure 82 ZDEMO_AIN_CL34 ABAP Code for Tooltip

Figure 83 ZDEMO_AIN_CL34 Change layout screen

 


 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - seltext

Details
Łukasz Pęgiel
ALV Grid in the nutshell
12 September 2019
Hits: 8357
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , SELTEXT , ALV GRID

 

SELTEXT is one of the fields that are linked to the texts of the grid columns. This particular one is responsible for displaying the name of the column in the change/display of layout popup.

Figure 79 ZDEMO_AIN_CL33 Column description in the layout popup

 

In case the TOOLTIP field is empty, the value from SELTEXT will be also used as tooltip and will appear when you hover the mouse over the column in the grid.

  

Figure 80 ZDEMO_AIN_CL33 SELTEXT as a TOOLTIP

 


 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - convexit

Details
Łukasz Pęgiel
ALV Grid in the nutshell
29 July 2019
Hits: 11566
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , CONVEXIT , ALV GRID

Conversion Exit was already mentioned while describing the EDIT_MASK field, but here it is called in a bit different way. Before saying how, it is important to understand the conversion exits. They are no more and no less than a function modules that helps to represent the internal values into understandable or more readable values. An basic example is field MATNR which is 18 characters long in ECC and 40 in S/4 HANA, and if it contains only numbers (for example 123),  then the internal value is stored with leading zeros, for example 000000000000000123 in ECC system. As you can imagine reading 123 is easier than 000000000000000123, that’s why field MATNR uses conversion exit ALPHA which deletes the leading zeros in case there are only numbers inside the fields.

There are many standard conversion exits, you can find the by searching of FM that begins with CONVERSION_EXIT_*. You’ll notice that after the second underscore there is a five characters name of the conversion exit, and then _INPUT or _OUTPUT. _INPUT and _OUTPUT describes if the FM is responsible for converting external value into internal (INPUT) or form internal value into external (OUTPUT).

 

Figure 75 Search of Conversion Exits

In the example program ZDEMO_AIN_CL32 I’ve setup column CONNID to use conversion exit NUMCV. As you see you don’t put the full name of the FM into the CONVEXIT field, it only assumes to get the 5 characters describing the name of the exit. It knows automatically that for output it needs to use CONVERSION_EXIT_NUMCV_OUPUT and for input (in case of editable fields) CONVERSION_EXIT_NUMCV_INPUT.

 

Figure 76 ZDEMO_AIN_CL32 Conversion Exit NUMCV for field CONNID

When you run the program you can select if you want to see the CONNID with or without conversion exit. In case you want to see it with it, the values of the field will be represented with leading zeros. You may be wondering why it is opposite when you don’t use conversion exit as the internal value in the database is with leading zeros. For some of the types (like NUMC) the output is always done without leading zeros, so if you want to explicitly set to see them, you need to use conversion exits.

Figure 77 ZDEMO_AIN_CL32 Output with Conversion Exit NUMCV

 

The next figure shows the output without the conversion exit.

 

Figure 78 ZDEMO_AIN_CL32 Output without Conversion Exit NUMCV

 


 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - tech

Details
Łukasz Pęgiel
ALV Grid in the nutshell
29 July 2019
Hits: 13154
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , TECH , ALV GRID

Technical field allows you to do similar thing as NO_OUT, you can hide the field on the output, the difference is that, users are not able to unhide this field. As NO_OUT, in order that TECH field work, you need to set its value to ‘X’.

 

Figure 70 ZDEMO_AIN_CL30 Setting of Field as Technical

 

Such setting is very helpful when you have to store some additional values in the internal table that supposed to be displayed, but you do not want to display them. Such field can be used for example during the event handling or displaying totals and subtotals.

It can also be used with the AUTHORITY-CHECK, just assume that you want to display one or two columns only to specific users that have the authorization for it ( like simple sales margin). After checking the authorization, you can setup the field as technical if user doesn’t have authorization to see it.

 

Figure 71 ZDEMO_AIN_CL30 Technical fields are not visible

 


 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - no_out

Details
Łukasz Pęgiel
ALV Grid in the nutshell
29 July 2019
Hits: 16523
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , NO_OUT , ALV GRID

NO_OUT is useful when you want to hide the field on the output, but still allow users to unhide it on demand. As lots of fields from field catalog, it can be filled with ‘X’ or space (default).

If you set it to ‘X’, then as long as user will not unhide it and save it to the ALV variant, it will not be visible on the screen. But as said before it can be unhide using the display options.

 

Figure 68 ZDEMO_AIN_CL29 hiding of columns

In this case I’ve also filled the REPTEXT column, in order to show you that it is possible to move the columns to display. If I wouldn’t do that, then description would be empty.

 

Figure 69 ZDEMO_AIN_CL29 Change of the layout

 

 

 

 


 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - no_sum

Details
Łukasz Pęgiel
ALV Grid in the nutshell
28 July 2019
Hits: 7766
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , NO_SUM , ALV GRID

As you can imagine from the name, NO_SUM does mostly opposite what DO_SUM, but in more secure way. If you don’t want that the field is allowed to be summarized, then set the value of this field to ‘X’. It will not only not show the sum, but also it will forbid to set it the GUI.

 

Figure 66 ZDEMO_AIN_CL28 DO_SUM for DISTANCE field

 

Once user will try to summarize the values of this column, he will get the message “Desired operation cannot be performed for column”.

 

Figure 67 ZDEMO_AIN_CL28 Message at try of making sum of DISTANCE field

 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - do_sum

Details
Łukasz Pęgiel
ALV Grid in the nutshell
28 July 2019
Hits: 10482
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , DO_SUM , ALV GRID

DO_SUM is very helpful when you want to assure that some of the numeric fields are summarized directly after the output, without interaction from the user side. In order to do so, just put the ‘X’ or ABAP_TRUE into the value of this field in the field catalog.

One remark, if you’re adding this setting to value or quantity field, make sure that you also fill the QFIELDNAME or CFIELDNAME to have the sum of each unit or currency separately. In other case the values will be summarized without taking in consideration differences in the units.

 

Figure 64 ZDEMO_AIN_CL27 DO_SUM set for DISTANCE field

 

Figure 65 ZDEMO_AIN_CL27 Results with the DO_SUM and QFIELDNAME filled

 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - fix_column

Details
Łukasz Pęgiel
ALV Grid in the nutshell
28 July 2019
Hits: 11784
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , FIX_COLUMN , ALV GRID

FIX_COLUMN can be useful when you have a lots of fields in the field catalog and you want to make sure that some of the key fields are always visible, for example sales order number and position or posting document number. When you setup the value of this field to ‘X’, then the column(s) will be always visible. While scrolling the fields after the last field which has this flag will be moving left or right.

It is important to remember that it is not enough to say that for example 3rd column should be fixed. You must set this flag to all fields up to the last one, that should be fixed in order this setting work correctly.

Figure 61 ZDEMO_AIN_CL26 Setting FIX_COLUMN

 

 

Just make sure that you do not setup too much field like this, as it can happen that on small screens users will only see selected fields and nothing more.

When you’ll run the ZDEMO_AIN_CL26 program, you can see the behaviour of the FIX_COLUMN field. If you have wide screen, please resize the SAP GUI window, so the full grid is not visible.

 

Figure 62 ZDEMO_AIN_CL26 Field catalog fixed on AIRPFROM field

 

Figure 63 ZDEMO_AIN_CL26 Field catalog fixed on AIRPFROM field

 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - emphasize

Details
Łukasz Pęgiel
ALV Grid in the nutshell
01 July 2019
Hits: 46063
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , EMPHASIZE , ALV GRID

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
Read more ...

ALV Grid in the nutshell: Field catalog - edit_mask

Details
Łukasz Pęgiel
ALV Grid in the nutshell
28 June 2019
Hits: 15402
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , EDIT_MASK , ALV GRID

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 ...

ALV Grid in the nutshell: Field catalog - no_convext

Details
Łukasz Pęgiel
ALV Grid in the nutshell
27 June 2019
Hits: 4403
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , NO_COVEXT , ALV GRID

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
Read more ...

ALV Grid in the nutshell: Field catalog - no_zero

Details
Łukasz Pęgiel
ALV Grid in the nutshell
27 June 2019
Hits: 6475
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , NO_ZERO , ALV GRID

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
Read more ...

ALV Grid in the nutshell: Field catalog - col_pos

Details
Łukasz Pęgiel
ALV Grid in the nutshell
24 June 2019
Hits: 7397
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , COL_POS , ALV GRID

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
Read more ...

ALV Grid in the nutshell: Field catalog - fieldname

Details
Łukasz Pęgiel
ALV Grid in the nutshell
24 June 2019
Hits: 7004
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , FIELDNAME , ALV GRID

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
Read more ...

More Articles ...

  1. ALV Grid in the nutshell: Field catalog - tabname
  2. ALV Grid in the nutshell: Field catalog - currency
  3. ALV Grid in the nutshell: Field catalog - ifieldname
  4. ALV Grid in the nutshell: Field catalog - round
  5. ALV Grid in the nutshell: Field catalog - cfieldname
  6. ALV Grid in the nutshell: Field catalog - qfieldname
  7. ALV Grid in the nutshell: Field catalog - quantity
  8. ALV Grid in the nutshell: Field catalog - exponent
  9. ALV Grid in the nutshell: Field catalog - key
  10. ALV Grid in the nutshell: Field catalog - key_sel
Page 2 of 11
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
  • End


Łukasz Pęgiel
ALV GRID TECH ALINK CONNECTION GTINSERT PROGRAM INDEX FIELDCATALOG ROLLNAME ABAP ELEMDESCR GUI ALV GRID REUSE DISPLAY LVC SMP DYNTXT COC1 FEATURE CHECK SCAN ABAP-SOURCE Scan program for authority-check PURCHASE REQ FACTORY Battleships game two players ALV GRID IN THE NUTSHELL SAP WebIDE GET SELECTED ROWS ESRUO GOS SERVICE TOOLS RESET REL ALLOWED RELEASABLE PROVIDE COM OPR SAPGUI SET FUNCTIONCODE SAP Fiori - HTTP request failed403 FCAT ALV Grid in the nutshell Field catalog - tabname Field catalog - sp group - Group key Copying is not poss USER INFO COL FALV CMD API EXTRACT ABAP Code Retreat JSON2ABAPtype STRUCTDESCR ESDUS Range to search in lower case fields SAVE SETTINGS Field catalog - col id - ALV control Column ID REQUISITION MAT BOM CREATE COPY ATC OBJECTS CFIELDNAME MEPO DOCUMENT GTMOVE LINKED Zipping in IZArc with ABAP directly on PC HTTP CLIENT Field catalog - seltext ADT QFIELDNAME TRANSFER FROM SLIS RSFUNC TXT TechEd Endless loop in BADI ME PROCESS CUST SALV
  • Laserowe usuwanie blizn Tychy
  • Laserowe usuwanie zmarszczek Tychy
  • Salon Kosmetyczny Tychy
  • Trycholog Tychy
  • Wypadanie włosów Tychy
Tweets by abapblog

Eclipse Plugins for ABAP

ABAP Favorites

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

ABAP ADT Extensions

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

ABAP Quick Fixes

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

 

Latest Articles

  • ABAP in Eclipse - Install, Configure, Use, and Enhance Your ADT
  • ALV Grid in the nutshell: Field catalog - col_id - ALV control: Column ID
  • ALV Grid in the nutshell: Field catalog - dfieldname – Fieldname for column group
  • ALV Grid in the nutshell: Field catalog - Hotspot - ALV control: SingleClick-sensitive
  • ALV Grid in the nutshell: Field catalog - sp_group - Group key
  • ALV Grid in the nutshell: Field catalog - domname - Domain name
  • ALV Grid in the nutshell: Field catalog - reprep - ALV control: Value is selection criterion for rep./rep.intf.
  • ALV Grid in the nutshell: Field catalog - reptext – Heading
  • ALV Grid in the nutshell: Field catalog - lowercase - Lowercase letters allowed/not allowed
  • ALV Grid in the nutshell: Field catalog - intlen - Internal Length in Bytes
  • Downloading Exchange Rates from NBP (National Bank of Poland)
  • Downloading Exchange Rates from Central Bank of Turkey
  • ABAP Extensions - Automatic Logon
  • ALV Grid in the nutshell: Field catalog - inttype - ABAP data type (C,D,N,...)
  • ALV Grid in the nutshell: Field catalog - datatype

Most Read

  • Create XLSX/MHTML file from internal table in background
  • Refresh ALV GRID and keep position and current cell
  • Create XLSX file from internal table in background v2
  • FALV (Fast ALV Grid)
  • ATC Pseudo Comments list
  • Call standard F4 search help with customized parameters
  • Dynamic GUI STATUS & TITLE with ABAP code
  • Create fieldcatalog from internal table
  • Link Attachments of Purchase Requisition to Purchase Order
  • GOS - How to add business documents at creation of object
  • Endless loop in BADI ME_PROCESS_PO_CUST
  • Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 3 - Chart Data and render
  • How to access private or protected data and methods of CL_GUI_ALV_GRID
  • Subtotal lines of ALV GRID OO as content separator
  • Popup with multi-select ALV
feed-image Feed Entries

Latest Comments

ABAP code and articles provided on http://abapblog.com, if it is not statet otherwise, were created by Łukasz Pęgiel. You can use the code in your SAP instance for commercial and non-commercial use without any warranty from side of the author. You cannot sell the code as a full program or a part of it.
Replicating of the articles and code is prohibited unless the agreement of the author is given to you. 

Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.