✒️ABAP / El chequeo, la prueba y la utilización del Table Painter en los Smartforms Por Carlos Piles Rosell

Selector Alummnos / Empresas

ABAP El chequeo, la prueba y la utilización del Table Painter en los Smartforms

ABAP El chequeo, la prueba y la utilización del Table Painter en los Smartforms

Hoal Compañeros:

Quiero compartir con vosotros estos apuntes, aunque están en inglés.

Tables: Topic Objectives

At the conclusion of this topic, you will be able to:

  • Create tables and their line types
  • Explain how tables are processed
  • Output data in tables
  • Create control levels
  • Create headers and footers

Tables: Overview

  1. MAIN Main window
  2. BOOKINGS Booking table
  3. Header
  4. CARRID Beginning of control level
  5. C_FLIGHT Flight
  6. C_DATE Date
  7. C_PRICE Price
  8. CARRID End of control level
  9. Footer

Your bookings:

|Flight | Date | Price |CUR|

|AA017 |12/16/2000| 1,200.00 |USD|

|AA017 |12/31/2000| 1,200.00 |USD|

|Sum for AA | 2,400.00 |USD|

|LH400 |11/17/2000| 581.00 |DEM|

|LH402 |11/17/2000| 669.00 |DEM|

|Sum for LH | 1,250.00 |DEM|

|Total | 2,400.00 USD

| 1,250.00 DEM

Forms are frequently used to output data in tables. Tables in SAP Smart Forms are subnodes of windows and are created like all other subnodes using the context menu (right mouse button) of the navigation tree. Since the length of tables is dynamic, you should only use them in main windows since they may be truncated in secondary windows.

You can format the individual line types in the graphical Table Painter. Tables provide functions to output headers and footers, sorting levels, and subtotals.

Before you can fill tables with text, you must determine the table width and define line types on the Table tab of the maintenance screen. By doing this, you specify how many cells a table line should hold and what width these cells should have. (The height is determined automatically.) For simple applications, a single line type is sufficient. However, you can also create different types for hierarchical (multi-level) tables. You do this, for example, if you want to print the bookings for a flight in the next lines or if you want to use subtotals.

In the output options of the table text nodes you specify which line types should be used when. The following information (in addition to the name and description) is required for line types:

  • * Default type: You can only mark one type as the default type. If no line type is assigned to a subnode of the table, the system uses the default type.
  • * Page protection against page breaks
  • * Number and width of the cells

The total width of the table must be identical to the total width of all cells for each line type. You use the horizontal alignment to determine how the table should be aligned with reference to the window margin. You can choose between Left, Right, and Centered. If you choose Left or Right, you can optionally specify a distance from the respective window margin.

The Table Painter

Instead of entering the line types in the table control, you can also define them in the graphical Table Painter. The entries you make in the Table Painter are automatically copied to the alphanumeric representation and vice versa.

You insert a new cell by vertically dragging the pencil-shaped mouse pointer at the desired position while keeping the left mouse button pressed. Alternatively, you can split the cell in which the mouse pointer is positioned using the context menu (right mouse button -> Split -> Cell).

You insert a new line by horizontally dragging the mouse pointer at the desired position. Alternatively, you can use the context menu (right mouse button -> Insert -> Line).

You change the width of a cell by placing the mouse on a cell boundary and dragging the boundary to the desired position while keeping the left mouse button pressed. (The mouse pointer assumes the shape of a double arrow.)

You cannot set the height of individual line types because the height is determined dynamically at application program runtime, depending on the data that is output.

The most important settings (which are basically identical to that of the Form Painter) are displayed in the detachable toolbar of the Table Painter. For further options, choose Utilities -> Settings -> Table Painter tab, or click the right pushbutton of the toolbar.

If the Draw lines and columns checkbox is selected, you can draw the cells of the line types directly with the mouse (as described on the previous slide). If you do not select this checkbox, you can move the table within the window width to the left or to the right - provided you have not chosen Centered as the horizontal alignment of the table.

Several zoom options are available to adjust the display. The most comfortable option is the automatic zoom. To make the drawing of cells easier, you can show a grid and/or the main grid. You can also make a setting in the Table Painter which ensures that vertical cell boundaries are automatically aligned with the grid when you move them with the mouse. You can set the step size of both grids. The crosshair cursor which you can set instead of the normal mouse pointer on the General tab of the Table Painter settings also facilitates the drawing of cells.

The Tracker tab of the Table Painter settings allows you to determine how the table should be highlighted against the background. To hide the toolbar, choose Utilities -> Settings ->Table Painter tab, and deselect the Toolbar checkbox.

Table Patterns

You can define gridlines for the columns and lines of a table. To do this, you select from a number of table patterns. Choose Select pattern on the Table tab. You can also set the line width on the Table tab.

  • * Select the pattern you want to use by clicking it with the mouse. You can choose whether the first, the last or all lines should be separated by horizontal gridlines and/or whether the first, the last or all columns should be separated by vertical gridlines. All patterns are available with a border and without a border around them. The selected pattern then appears on the Table tab.
  • * You cannot set separate patterns for different line types because the pattern is always applied to the entire table.

From a technical point of view, a table in an SAP Smart Form is filled by processing a specific table called an internal table on a line-by-line basis. This is referred to as a loop. The respective lines can be copied into a work area that has the same structure as the table. The internal table must be filled in the application program (which is the regular case) or in the form. The data is normally taken from database tables. If the data is read in the application program, the internal table must be defined in the interface of the SAP Smart Form.

  • * If the internal table is very large, we recommend that you process the table using field symbols instead of a work area since field symbols can directly access the individual lines so that the lines need not be copied.

After defining the table design on the Table tab, you determine how the table should be processed. You do this on the Data tab.

Select the Internal table checkbox and enter a name for the table and for the work area field-symbol. Both the internal table and the work area must be known in the form. This means they must have been defined through the interface or as a global field. If you do not set the Internal table indicator, no loop processing takes place. This makes sense, for example, if you want to output text in parallel columns.

Possible assignment types are into and assigning. If you use into, the lines are copied from the table into the work area. If you use assigning, the lines are assigned to a field symbol. If you want to use tables with header lines, enter the name of the table as the work area.

It is possible to process only a specific line range of the internal table. To do this, specify the lines in the fields Line ... to...

You can also use logical conditions to determine which lines of the internal table should be processed. This corresponds to the WHERE clause of the ABAP command LOOP AT <itab>. Enter the name of a field of the work area, a relational operator and the comparison value. You can use all relational operators that you know from normal selection screens: With/without pattern, Equal to, Not equal to, Greater than or equal to, Greater, Less than or equal to, Less. If you do not enter an operator, Equal to is used automatically. You link several conditions with and; you can also use the OR pushbutton.

In order to output text in tables, you must create at least one text node as a subnode of the table. Table text nodes are "normal" text nodes. This means you can choose the text type (text element, text module, or include text) and you can select New paragraph or New line on the General attributes tab to determine that the text should be written into a new text line. There is one difference, however, on the Output options tab. On this tab, you determine the text output in table lines:

  • * Option New line: - This option allows you to select one of the line types for this table line that you defined on the Table tab. If you do not select a line type, the system automatically uses the line type marked as the default type.
  • - The new table line is displayed with gridlines - provided you have selected a table pattern for the table.
  • * If you select New cell, the text is output in the next cell of the line type. If the line type has no more cells for the system to go to, an error message is issued during program execution. You can also skip several cells. If you select New line, the text is automatically output in the first cell of the line type selected unless you want to skip cells.
  • * It is also possible to create other nodes or more than one node in a cell.
  • * A table line may extend over two pages at the most.
  • * Create a folder for all nodes in a line in the navigation tree to mark them as such. See Unit 7 - Flow Control.

You can sort the internal table within the form. To do this, enter the name of the fields as the Sort criteria to use. The order of the fields in this list determines the sort order. You can change the sort order later by placing your cursor on a field and moving it up or down one line by clicking one of the two black triangles displayed above the sort criteria. Two radio buttons to the right of each field allow you to determine whether the table should be sorted in ascending or descending order.

  • * For technical reasons, the system cannot recognize whether the internal table has already been sorted (for example, in the data retrieval program). Hence you must enter the sort criteria and select the Already sorted checkbox. (Otherwise, the table will be sorted again.)
  • * Sorting is required for subtotals and subheadings.

Frequently, tables are not output in exactly the same structure in which they are filled. For example, it should be possible to group data records and to output subheadings or subtotals. Grouped data records that have certain identical values are called control levels. SAP Smart Forms allow you to create any number of control levels in a table. In the above example, there is one control level for airline carriers and another for the respective flight connections.

If you select Beginning of control level and/or End of control level for a specific sort criterion, the corresponding control levels are inserted into the navigation tree of the table. A control level contains all records of the internal table that have the same value in the sort field. In the example above, all records of an airline carrier belong to one control level.

You can determine the data to be output at the individual control levels as required because you can insert all nodes that you could also insert as direct subnodes of a table, that is, in particular program lines for subtotals calculation, text nodes for the output of these subtotals, or command nodes for manual page breaks. The node of a control level, called an event node, has only one tab in the maintenance screen, the Output options tab. On this tab, you can make some of the settings that you can define for other subnodes of a table: You can set a style and determine the line type and the cell.

You can define control levels for all sort fields. This means you can set up a hierarchical table that contains, for example, one control level for airline carriers and one for flight connections. You cannot create control levels directly as nodes in the navigation tree. You must always follow the procedure described: Determine the sort criteria and then select the Beginning of control level and/or End of control level checkbox.

  • * You can use events to control the output of headers and footers in a table. To do this, you select a header and/or footer on the Events tab of the table node. The corresponding event node then appears in the navigation tree.
  • * You can output headers at the beginning of the table and/or after a page break. Similarly, footers can be output at the end of the table and/or before a page break. You must specify a height for the footer to enable the form processor to reserve sufficient space.
  • * You use headers for column headings, for example. To do this, create a text node and - if required - select an appropriate line type on its Output options tab.
  • * Footers are typically used to output subtotals since footers are not processed before the page break occurs. You calculate subtotals using nodes of the Program lines type. (See Unit 7 - Flow Control.)
  • * You cannot create footers and headers directly as nodes in the navigation tree. You must always follow the procedure described for the Events tab.
  • * Note that all lower-level nodes are lost if you deactivate a header or footer.


 

Escanear / Compartir

 

 


Sobre el autor

Publicación académica de Carlos Piles Rosell, en su ámbito de estudios para el Curso SAP ABAP Avanzado.

SAP Senior

Carlos Piles Rosell

Profesión: Analista de Sistemas y Programador - España - Legajo: GZ57B

✒️Autor de: 24 Publicaciones Académicas

🎓Egresado de los módulos:

Disponibilidad Laboral: PartTime

Certificación Académica de Carlos Piles

✒️+Comunidad Académica CVOSOFT

Continúe aprendiendo sobre el tema "El chequeo, la prueba y la utilización del Table Painter en los Smartforms" de la mano de nuestros alumnos.

SAP Senior

procesos finales y herramientas de utilidad para trabajar con formularios Smartforms en SAP. Antes de utilizar un formulario, es esencial realizar una verificación de sintaxis y semántica para detectar errores, similar a lo que se hace en los programas ABAP. Este chequeo se realiza mediante el botón "Verificar" disponible en la transacción SMARTFORMS. Además, al igual que otros objetos de desarrollo ABAP, los Smartforms deben activarse para poder ser ejecutados. Una funcionalidad práctica es la posibilidad de probar el formulario directamente sin necesidad de crear y ejecutar un programa impresor completo. Esto se logra desde la misma transacción SMARTFORMS usando también el botón...

Acceder a esta publicación

Creado y Compartido por: Mara Fadua Romero Hernandez

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master


El Chequeo, la Prueba y la Utilizacion del Table Painter. Verificación y corrección de errores Se utiliza el botón Verificar para comprobar errores de sintaxis y semántica en los smartphones, similar al proceso en otros programas above. Los errores y advertencias se visualizan en la parte inferior derecha de la pantalla. Haciendo doble clic en el error o advertencia, el sistema redirige directamente al área a corregir. Tras modificar el smartphone, como asignar un valor inicial a una variable global, es necesario activarlo para su uso. Los formularios smartphone deben activarse igual que otros objetos en el sistema. Pruebas y ejecución...

Acceder a esta publicación

Creado y Compartido por: Juan Ignacio Romero

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master

Introducción: Aprende a verificar, probar y transportar SmartForms eficientemente. Domina técnicas para depurar errores, ejecutar sin programa impresor y migrar formularios entre sistemas SAP. 1. Verificación y Activación de SmartForms Pasos clave: Verificar sintaxis: Botón Verificar o menú Formulario → Verificar. Errores/advertencias se muestran en la parte inferior. Doble clic en error para navegar a su ubicación. Corregir errores: Ejemplo: Asignar valor inicial a variables globales no definidas. Activar: ...

Acceder a esta publicación

Creado y Compartido por: Oscar Aravena Muller / Disponibilidad Laboral: FullTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert



El chequeo, la prueba y la utilización del Table Painter en los SmartForms de SAP En el entorno SAP, SmartForms es una herramienta gráfica que permite diseñar formularios sin necesidad de utilizar directamente el lenguaje de programación ABAP. Una de las funcionalidades clave que ofrece es el Table Painter, utilizado para diseñar tablas personalizadas dentro de los formularios. Este componente es especialmente útil cuando se necesita mostrar información estructurada como líneas de factura, listas de materiales o cualquier otro contenido tabular. Utilización del Table Painter El Table Painter es una herramienta gráfica dentro del entorno de diseño de SmartForms que permite...

Acceder a esta publicación

Creado y Compartido por: David Ibarra / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

Temas: Smartforms y Table Painter 1. Chequeo de Errores de Sintaxis en un Smartform Descripción: Permite validar la sintaxis y semántica del Smartform, mostrando errores y advertencias en pantalla. Al hacer doble clic en el error, el sistema te lleva directamente para corregirlo. Cómo Acceder a la Opción: Usar el botón "VERIFICAR" (o "Check"); para navegar al error, haz doble clic en el nodo correspondiente. 2. Prueba de un Smartform sin un Programa Impresor (Ejecución Directa) Descripción: Ejecuta el Smartform directamente como un módulo de función, permitiendo probar con parámetros de entrada y previsualizar la salida. Se configura el dispositivo...

Acceder a esta publicación

Creado y Compartido por: Roberto Fluder Ahumada

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

EL CHEQUEO, LA PRUEBA Y LA UTILIZACIÓN DEL TABLE PAINTER EN LOS SMARTFORMS. 1) El chequeo de los errores de sintaxis en un Smartform. para comprobar los errores de sintaxis y de semántica del Smartform vamos a utilizar el botón VERIFICAR tal como hacemos para verificar los errores en los programas ABAP. al ejecutar la verificación vamos a visualizar los errores y advertencias en el extremo inferior derecho de la pantalla. si hacemos doble clic en el nodo correspondiente al error o advertencia entonces, en la imagen anterior en %TEXT3, el sistema nos lleva al eroor o advertencia para que podamos corregirla.

Acceder a esta publicación

Creado y Compartido por: Luis Enrique Romero Pinto

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


El campo dispositivo de salida de la ventana de dialogo presenta un mathcode, si hacemos click en ese mathcode o presionamos la tecla F4 vamos a visualizar otra ventana de dialogo donde podremos filtrar los dispositivo de salida que se encuentran disponibles en SAP, cuando hablamos de dispositivos de salida nos referimos a las impresoras que se encuentran instaladas en el sistema SAP, por ejemplo si escribimos * en el campo dispositivo de salida y ejecutamos entonces vamos a visualizar en la pantalla todas las impresoras instaladas en SAP. Podemos configurar distintos aspectos del TABLEPAINTER haciendo el menu utilidades opciones y seleccionando las solapas TABLEPAINTER, en la solapa general podemos configurar que el TABLEPAINTER tenga marcos...

Acceder a esta publicación

Creado y Compartido por: Jose Medina / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Senior

El chequeo de los errores de sintaxis en un Smartform. Para comprobar los errores de sintaxis y de semántica del Smartform vamos a utilizar el botón Verificar. Al ejecutar la verificación vamos a visualizar los errores y advertencias en el extremo inferior redecho de la pantalla. Si hacemos doble clic en el nodo correspondiente al error o advertencia entonces, en la imagen anterior en %TEXTO3, el sistema nos lleva al error o advertencia para que podemos corregirla. Luego de realizar la modificación al Smartform, que para este caso consistian en asignar un valor inicial a una variable global, activamos el Smartform. Como probar un Smartform sin tener que ejecutar el programa impresor? Podemos ejecutar los Smartforms...

Acceder a esta publicación

Creado y Compartido por: Javier Miguel Angel Barcelo / Disponibilidad Laboral: PartTime

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Master

EL CHEQUEO DE LOS ERRORES DE SINTAXIS EN UN SMARTFORM. Para comprobar errores de sintaxis vamos a utilizar el botón verificar. Los errores y advertencia los visualizar emos en el extremo derecho inferior derecho de la pantalla. Si hacemos doble clic en el nodo correspondiente al erro o advertencia en el %TEXT3, el sistema nos lleva al error o advertencia para que podamos corregirla. COMO PROBAR UN SMARTFORM SIN TENER QUE EJECUTAR EL PROGRAMA IMPRESOR. Podemos ejecutar directamente la transacción Smartforms en el botón verificar. Cómo los formularios SmartForms internamente son módulos de funciones lo que visualizamos es el nombre de módulo de funciones que ejecuta el SmartForm. Con el debugging o la...

Acceder a esta publicación

Creado y Compartido por: Gerardo Jose Campos Tovar / Disponibilidad Laboral: FullTime + Carta Presentación

*** CVOSOFT - Nuestros Alumnos - Nuestro Mayor Orgullo como Academia ***

SAP Expert


Smartforms: Checking, Testing, and Utilizing the Table Painter Smartforms - Checking Allows validating the syntax of the form. It is activated by clicking the Check button. If there are errors or warnings, they appear in an error table. Double-clicking with the mouse will position us at the error point, where modifications can be made. It's essential to activate the form after any changes. Smartforms - Testing As the Smartform is developed, it can be tested by pressing the Execute button (or F8). Since SmartForms are internally function modules, executing a SmartForm runs the function that invokes it. Therefore, testing a SmartForm is similar to testing a function in SE37. When executed directly, a Dialog Box will appear, where "OutputDevice"...

Acceder a esta publicación

Creado y Compartido por: Jaime Eduardo Gomez Arango / Disponibilidad Laboral: FullTime + Carta Presentación

 


 

👌Genial!, estos fueron los últimos artículos sobre más de 99.000 publicaciones académicas abiertas, libres y gratuitas compartidas con la comunidad, para acceder a ellas le dejamos el enlace a CVOPEN ACADEMY.

🔎Buscador de Publicaciones:

 


 

No sea Juan... Solo podrá llegar alto si realiza su formación con los mejores!