• 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 - lowercase - Lowercase letters allowed/not allowed

Details
Łukasz Pęgiel
ALV Grid in the nutshell
13 April 2020
Hits: 8919
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , LOWERCASE , ALV GRID

The changes of this parameter are only visible in edit mode and makes sense only for character or string fields. If it is set to ABAP_TRUE (‘X’), then the ALV grid stores in internal table the value in lowercase, if the value of the parameter is empty, then it will always convert the entered value to uppercase.

 

Figure 96 Results of zdemo_ain_cl39 with lowercase turned on

 

 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - intlen - Internal Length in Bytes

Details
Łukasz Pęgiel
ALV Grid in the nutshell
13 April 2020
Hits: 5644
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , INTLEN , ALV GRID

As the description says, the meaning of that field is to set the internal length of the field in Bytes. During my whole career as ABAP Developer, I had never filled that field manually. Usually you’ll not bother yourself about it. But if you do, then take into consideration following information:

  • Length is in Bytes, so remember that it doesn’t mean, that one character takes one Byte
  • In display mode, you’ll not notice probably any change
  • When you’ll setup this incorrectly, you may have problems when you allow grid to be editable, for example:
    When I’ve set the INTLEN to ‘2’ for column FLTIME, then although I’ve entered the value of ‘12’ into the column, system didn’t allowed me to save it.

 

Figure 94 Error in edit mode caused by wrong value of field INTLEN (ZDEMO_AIN_CL38)

 


Figure 95 Error message of  ZDEMO_AIN_CL38

 

 

Add a comment
Read more ...

Downloading Exchange Rates from NBP (National Bank of Poland)

Details
Łukasz Pęgiel
How to...
06 April 2020
Hits: 8973
Tags: BAPI_EXCHANGERATE_CREATE , CL_HTTP_CLIENT , CALL TRANSFORMATION

Following the example of downloading exchange rates from Central Bank Of Turkey using transformations, please find bellow the same way for National Bank of Poland.

Again, lets create an RFC destination (lets call it here Z_DESTINATION_TO_NBP) tha will point to https://www.nbp.pl/kursy/xml/lasta.xml, where the last exchange rates are posted.

Add a comment
Read more ...

Downloading Exchange Rates from Central Bank of Turkey

Details
Łukasz Pęgiel
How to...
06 April 2020
Hits: 10021
Tags: BAPI_EXCHANGERATE_CREATE , CL_HTTP_CLIENT , CALL TRANSFORMATION

One of the standard requests that comes with every SAP implementation is automatic download of exchange rates to your system. Today I will show you on an example of Central Bank Of Turkey, how to transform XML from bank site into internal table, which can be then used inside your code to populate values of  BAPI_EXCHANGERATE_CREATE FM.

There are few ways to download the XML to your ABAP code, I prefer to create an RFC destination (lets call it here Z_DESTINATION_TO_TCMB), as on many servers you need to provide credentials for PROXY and it is safer to keep it saved inside RFC destination, than in your ABAP code in plain text.

So lets assume you have an RFC destination that points to https://tcmb.gov.tr/kurlar/today.xml. It will look like this:

Add a comment
Read more ...

ABAP Extensions - Automatic Logon

Details
Łukasz Pęgiel
How to...
04 January 2020
Hits: 19060
Tags: ECLIPSE , ADT , PLUGIN , ABAP EXTENSIONS , AUTOMATIC LOGON

Yesterday I've announced that I'm working on automatic logon to SAP systems on Eclipse. Today the changes in the plugin ABAP Extensions for Eclipse are published and you can use the first version of the automatic logon on your installations.

 

ABAP Extensions plugin you can find in Eclipse Marketplace or by doing direct installation from this link http://abapblog.com/eclipse/plugin/ABAPFavorites/ or by using the install button which you can find on the right side of this page.

 

After installation of update will be able to set the preference if you want to do automatic logon at start of Eclipse and if you want to logon automatically only to the systems, for which you have stored the password already. These are also default settings for the plugin. The logon happens in the background job. So if you have several systems in your workspace, it will take a while to logon to all the systems. The progress you can follow in the Progress View.

 

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - inttype - ABAP data type (C,D,N,...)

Details
Łukasz Pęgiel
ALV Grid in the nutshell
18 December 2019
Hits: 11426
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , INTTYPE , ALV GRID

As you can imagine, INTTYPE is just a presentation of DATATYPE in internal SAP format in most of cases. I wrote most of cases because it can also say if the field in internal table is a reference to other type, or for example a table.

Just like DATATYPE, you don’t need to fill this field manually, when you’ll leave it empty, ALV grid will automatically setup a proper type according to referenced internal table field. But if you’ll have unstoppable need of filling it, then the behaviour of the column will be exactly the same like you would use DATATYPE field, means JUST, OUTPUTLEN, INTTYPE, INTLEN and DD_OUTLEN fields will be also field and the difference on the screen will be not that huge.

 

Figure 93 Fieldcatalog of the ZDEMO_AIN_CL37 for Internal ABAP type T

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - datatype

Details
Łukasz Pęgiel
ALV Grid in the nutshell
11 December 2019
Hits: 12608
Tags: CL_GUI_ALV_GRID , ALV GRID IN THE NUTSHELL , FIELDCATALOG , LVC_T_FCAT , DATATYPE , ALV GRID

DATATYPE field has small influence on the way the column is displayed. You can omit this field and then ALV grid will automatically fill this field and additionally JUST, OUTPUTLEN, INTTYPE, INTLEN and DD_OUTLEN on a base of the type of the output table field.  

But if you decide to fill it, then on a base of DATATYPE you’ll notice different justification or output length. But still all checks of the data entered in edit mode will be done on a base of the real data type of the linked internal table field.

Possible data types form system NW 7.52 SP04 can be found bellow.

Data Type

Short Description

ACCP

Posting Period YYYYMM

CHAR

Character String

CLNT

Client

CUKY

Currency Key for Currency Field

CURR

Currency Field in BCD Format

DF16_DEC

Decimal Floating Point Stored in BCD Format

DF16_RAW

Decimal Floating Point Stored as Binary Number

DF16_SCL

Decimal Floating Point with Scaling (obsolete)

DF34_DEC

Decimal Floating Point Stored in BCD Format

DF34_RAW

Decimal Floating Point Stored as Binary Number

DF34_SCL

Decimal Floating Point with Scaling (obsolete)

DATS

Date in Format YYYYMMDD

DEC

Packed Number in BCD Format

FLTP

Floating Point Number

INT1

1-Byte Integer, 0 to 255

INT2

2-Byte Integer, -32.768 to 32.767

INT4

4-Byte Integer, -2.147.483.648 to +2.147.483.647

INT8

8-Byte Integer

LANG

Language key

LCHR

Long Character String

LRAW

Long Byte String

NUMC

Numerical Text

PREC

Obsolete Data Type

QUAN

Quantity Field in BCD Format

RAW

Byte Sequence

RAWSTRING

Byte String (BLOB)

SSTRING

Character String

STRING

Character String (CLOB)

TIMS

Time in Format HHMMSS

UNIT

Unit Key of Quantity Field

VARC

Obsolete Data Type

Table 2 Possible data types in NW 7.52 SP04

Add a comment
Read more ...

ALV Grid in the nutshell: Field catalog - rollname

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

The main functionality of the ROLLNAME is to provide a data element that will be responsible for showing F1 help on the grid cell. If in data element the documentation is available, then it will be shown. If not, or if the ROLLNAME will be empty, you’ll receive the message “No documentation available” when you’ll press F1 on a grid cell.

Figure 84 Result of F1 with empty ROLLNAME

 

In the demo program I’ve used data element S_CONN_ID to show you how does it work.

Figure 85 ZDEMO_AIN_CL35 Selection Screen

 

On the first sight you can notice that if you’ll use ROLLNAME, then the column description, tooltip and column short and long texts are taken from the data element.

Figure 86 ZDEMO_AIN_CL35 Results with ROLLNAME

Figure 87 ZDEMO_AIN_CL35 Change layout screen

 

Additionally to this, the main behaviour is also there. F1 shows the documentation from the data element.

 

Figure 88 ZDEMO_AIN_CL35 F1 Help for CONNID column

 

 

Just to show you where this information comes from, here it comes the view from SE11 and data element S_CONN_ID.

Figure 89 SE11 for S_CONN_ID

 


 

Add a comment
Read more ...

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

More Articles ...

  1. ALV Grid in the nutshell: Field catalog - do_sum
  2. ALV Grid in the nutshell: Field catalog - fix_column
  3. ALV Grid in the nutshell: Field catalog - emphasize
  4. ALV Grid in the nutshell: Field catalog - edit_mask
  5. ALV Grid in the nutshell: Field catalog - no_convext
  6. ALV Grid in the nutshell: Field catalog - no_zero
  7. ALV Grid in the nutshell: Field catalog - col_pos
  8. ALV Grid in the nutshell: Field catalog - fieldname
  9. ALV Grid in the nutshell: Field catalog - tabname
  10. ALV Grid in the nutshell: Field catalog - currency
Page 1 of 11
  • Start
  • Prev
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • Next
  • End


Łukasz Pęgiel
COC1 FEATURE CHECK FALV ALINK CONNECTION LVC FCAT ZCL LAYOUT - layout settings ALV GRID MESSAGE HANDLER SAVE USER SETTINGS MB51 ENHANCEMENT FIELDCATALOG chart designer GET DDIC FIELD LIST SCAN ABAP-SOURCE COL POS CMD API PRINTOUTS ALV GRID IN THE NUTSHELL GUI TIMER Selection Screen - Part1 - Parameters BOM PROVIDE MBM Speed up your coding with ABAP in Eclipse SITWRO 2017 session ALV GRID FILENAME ALV Grid in the nutshell Field catalog - no sign MB51 NOLIST Field catalog - key AT SELECTION-SCREEN OUTPUT CSRF token validation failed F4 Help for external date DYNAMIC STATUS - for full screen or popup KEY Field catalog - dfieldname Fieldname for column group CVIC MAP CONTACT HTML VIEWER RM07DOCS ABAP DEVELOPMENT TOOLS IN ECLIPSE SUBTOTAL TEXT GLOBALS FROM SLVC FULLSCR REUSE DISPLAY ESRUO ABAP ZIP ESDUS Why I like to code in ABAP in Eclipse CURRENCY GTFIND MSC7 APPEND FALV Fast ALV Grid - First blood ZDEMO FALV06 - Grid Layout settings Mark field ICON PURCHASE ORDER ITEM SET CONDITIONS CREATE VARIANT HEADER HANDLE HTTP CLIENT FREE
  • 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.