• 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
  • Articles
  • ALV Grid in the nutshell

ALV Grid in the nutshell: Field catalog - just

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

With this field, you can setup alignment of the column. You can use one of the following values:

  • R - Right,
  • L - Left,
  • C - Centre,
  • space – default setting for field type

 

 

Figure 42 ZDEMO_AIN_CL19 Fieldcatalog with alignment

As you can see the columns are using the settings from fieldcatalog correctly.

Figure 43 ZDEMO_AIN_CL19 Results

 


 

 

Add a comment

ALV Grid in the nutshell: Field catalog - lzero

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

This field allows manipulation of visibility of leading zeros. One of the most common example is the material number (MATNR), when there is no letter inside the name of material, it is stored in database with leading zeros. For example material 101 would is stored as 000000000000000101 in ECC and 0000000000000000000000000000000000000101 in S/4 HANA. In order to not display this not needed zeros, you can setup LZERO to ‘X’.

 

Figure 44 ZDEMO_AIN_CL20 With leading zeros

 

Figure 45 ZDEMO_AIN_CL20 Without leading zeros

 


 

 

Add a comment

ALV Grid in the nutshell: Field catalog - no_sign

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

NO_SIGN can be used to hide the sign of the number. For example you have negative values but you want to display it as positive.

In order to show you the behaviour of this settings, I’ve manipulated the distance of the flight in the demo program by multiplying it by -1.

 

Figure 46 ZDEMO_AIN_CL21 Select

 

Figure 47 ZDEMO_AIN_CL21 Without NO_SIGN option

 

Figure 48 ZDEMO_AIN_CL21 With NO_SIGN option

 


 

 

Add a comment

ALV Grid in the nutshell: Field catalog

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

Field catalog is one of most important tables that is used in ALV Grid. In most cases you’ll create it manually or at least after automatic creation, you’ll update its content, as most of the columns settings are placed here. ALV Grid field catalog should have type LVC_T_FCAT. Of course as it’s not mandatory parameter you can also omit during the displaying on grid (like I did for example in program ZDEMO_AIN_CL01), but this is only allowed if the table you would like to display is of type that is kept in dictionary. In other case, you’ll be forced to create the field catalog and pass it as parameter to SET_TABLE_FOR_FIRST_DISPLAY method.

In table below you’ll find the list of all fields used in field catalog with its dictionary type and description. Some of the fields are quite simple to explain, some are harder, but bellow you’ll find description of all of them, whenever it was possible by me to check their behaviour. Click on the link on the field name (if exists) to get the deeper description and example of usage.

Add a comment
Read more ...

ALV Grid in the nutshell

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

I was thinking about writing a book about ALV Grid for a long time, but there was always an excuse to not to do it. One of the biggest was that SAP is now strongly advertising Fiori and UI5 as the next generation of UI in SAP world and I was thinking about when SAP will kill old ALVs. This so far didn’t happened and as there are dozens of ABAP developers who still creates reports and transactions inside the ERP systems using the good old ALV Grid, I’ve decided to finally do it. Personally I don’t see how expert users could easily switch to Fiori or UI5 apps, especially that I haven’t seen so far an editable grid or table there. But maybe I’m just blind. 

Personally I’d prefer that SAP would create new controls that would look like the one you can get in every Windows or iOS applications, which you can easily add via drag & drop in screen editor. But probably this will not happen soon, maybe even never. That’s why it’s really important to get an idea what you can do with the controls that are already available in SAP. In this tutorial I will try to show you what you can do with ALV Grid. If possible I will give you an example for each functionality, so you could really understand it easily. It will not be a story, it will be a journey through the good old ABAP days. It will not be easy to read, as this will be in most parts a technical description of possibilities that ALV Grid gives you, but I hope it will help you in your daily job. 

Add a comment
Read more ...

ALV Grid in the nutshell: Basic Information

Details
Łukasz Pęgiel
ALV Grid in the nutshell
24 June 2019
Hits: 43176
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , HOW TO START WITH ALV , ALV GRID

​​​​​​ I wrote in previous post, you can’t use this class directly without any effort. First of all, the class itself will not display anything if you’ll not create a container for it. The following containers can be used:

  • Custom container
  • Splitter container
  • Docking container
  • Dialogbox container

 

1. Custom container

Custom container can be created with a class CL_GUI_CUSTOM_CONTAINER, but it needs a parent container in which it could be placed or it needs an custom control area to be created in custom screen . This solution is mainly used by me in the applications I develop now. But it’s also common that you’ll mix custom containers with other in one development.

Many persons creates the custom container during the PBO event of the screen that contains custom container area, but you don’t have to do that. You can create it also before calling the screen, like in the simple example of using CL_GUI_CUSTOM_CONTAINER that you can find in Figure 1 and in demo program ZDEMO_AIN_CL01.

Don’t try to find anything in this program, that was not needed just to quickly display the data on the grid. There is no GUI Status, there is no PBO and PAI handling. I did it on purpose just to create really simple example. (As you may read it the abapGit version can differ from here)

 

Figure 1 ZDEMO_AIN_CL01 example of using CL_GUI_CUSTOM_CONTAINER

 

Of course in order to be able to display the grid I had to create a SCREEN 0100 which contains custom container area named CC which you can find in Figure 2. The only additional setting for the screen I did was to setup its size to 200 x 255 and I have given the area possibility to resize vertically and horizontally, so it will fit to all screens. 

Add a comment
Read more ...
Page 6 of 6
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
  • End


Łukasz Pęgiel
PROVIDE COM OPR FIELDCATALOG Classifications - Part 4 - example of use ZCL FALV LAYOUT - layout settings Speed up your coding with ABAP in Eclipse SITWRO 2017 session ALV GRID ALV GRID IN THE NUTSHELL LVC FCAT KEY SEL JUST DELETE PRAGMA EDIT MASK BOM MBM GUI ALV GRID SUM FRIEND UPPER CASE CMD API EXTRACT Download ALV Grid in the nutshell Basic Information Reset rejection of Purchase Requisition TSK ALINK CONNECTION GTFIND ZDEMO FALV13 - Mix demo own screen and container SAP WebIDE MSC7 Enhanced MB51 Part 1 - Goal and prerequisites USER OBJECTS LOAD COMPLEX ITM MESSAGE HANDLER ABAP ZIP FREE SESSION CHECK CLAF CLASS Mass replace popup for ALV grid PURCHASE REQUISITION REFRESH FROM SELECTOPTIONS TABNAME GTINSERT SAPGUI PROGRESS INDICATOR CONVEXIT Field catalog - tooltip LEARN ABAP REUSE DISPLAY BAPI EXCHANGERATE CREATE TABLE ESDUS SCMS XSTRING BINARY MB51 FLAG GET ABAP Extensions - Automatic Logon GOS SERVICE TOOLS MERGE SELECTED COLUMNS TVCPLAK ROLLNAME ESRUO BCS CONVERT FALV14 - Popup calls
  • 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

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.