This document contains ABAP code for displaying an ALV grid report. It defines data structures for storing purchase order data and field catalog attributes. Methods are used to retrieve sample data, build the field catalog, layout, and display the ALV grid. Additional code allows setting specific field styles, like disabling editing for a price field if the value is over 10. The code also includes methods for initializing cell editing status based on a field, and toggling the editing mode.
This ABAP program creates a blocked ALV report to display material information from tables MARA, MAKT, and MARD. It defines types and internal tables for the data, builds field catalogs, selects the relevant data, and appends it to blocks in the ALV grid. Forms are used to add headings to each block and handle events for the top of page display. The report allows the user to select materials and displays description, plant, and storage location details in a multi-block grid format.
This document provides an example of the syntax used to create an ALV Grid or List (ALV Programming) in ABAP. It includes code snippets for declaring the necessary data types and tables, building the field catalog, layout, events, and display parameters needed to display an ALV report. The code shows how to populate sample data from a database table, add color attributes, and configure sorting and subtotals. It also includes code for custom events like a header display and tooltip text for selected fields.
The report finds all custom objects in the R3TR system that have a development class and object type specified by the user. It displays the objects in an ALV grid or downloads the data to a CSV file. It retrieves object data from the TADIR table and transaction code data from the TSTC table, then either displays it using REUSE_ALV_GRID_DISPLAY or fills a table for downloading using GUI_DOWNLOAD.
An ABAP Advanced List (ALV) report provides a standardized interface for displaying list reports. This document discusses different types of ALV reports, including using function modules and controls to display list and grid reports. It also provides examples of control break reports with one and two levels, using a field catalog to customize column properties, adding a derived column, and using a SELECT statement with an INNER JOIN.
This document discusses data manipulation in Oracle databases. It describes how to insert, update, and delete rows from tables using DML statements like INSERT, UPDATE, and DELETE. It also covers transaction management using COMMIT, ROLLBACK, and SAVEPOINT statements to control when changes are committed to the database or rolled back. Key aspects covered include inserting new rows, updating and deleting specific rows or all rows, and handling integrity constraints and transactions.
The document describes the creation of multiple database tables to model business entities such as branches, employees, departments, products, accounts, transactions, customers, and more. Primary keys are defined for each table and foreign keys are specified to represent relationships between the tables. Sample data is then inserted into the Branch and Product tables.
The document provides an introduction to SQL and covers various SQL statements and operators including:
1. SQL statements like SELECT, INSERT, UPDATE, and DELETE are used to retrieve, modify and manipulate data in databases.
2. Operators like WHERE, BETWEEN, IN, LIKE and NULL are used to filter rows and compare values in conditions.
3. Functions and clauses such as SELECT, FROM, DISTINCT, GROUP BY, JOIN, ORDER BY, etc. are used to customize data retrieval and presentation.
This ABAP program creates a blocked ALV report to display material information from tables MARA, MAKT, and MARD. It defines types and internal tables for the data, builds field catalogs, selects the relevant data, and appends it to blocks in the ALV grid. Forms are used to add headings to each block and handle events for the top of page display. The report allows the user to select materials and displays description, plant, and storage location details in a multi-block grid format.
This document provides an example of the syntax used to create an ALV Grid or List (ALV Programming) in ABAP. It includes code snippets for declaring the necessary data types and tables, building the field catalog, layout, events, and display parameters needed to display an ALV report. The code shows how to populate sample data from a database table, add color attributes, and configure sorting and subtotals. It also includes code for custom events like a header display and tooltip text for selected fields.
The report finds all custom objects in the R3TR system that have a development class and object type specified by the user. It displays the objects in an ALV grid or downloads the data to a CSV file. It retrieves object data from the TADIR table and transaction code data from the TSTC table, then either displays it using REUSE_ALV_GRID_DISPLAY or fills a table for downloading using GUI_DOWNLOAD.
An ABAP Advanced List (ALV) report provides a standardized interface for displaying list reports. This document discusses different types of ALV reports, including using function modules and controls to display list and grid reports. It also provides examples of control break reports with one and two levels, using a field catalog to customize column properties, adding a derived column, and using a SELECT statement with an INNER JOIN.
This document discusses data manipulation in Oracle databases. It describes how to insert, update, and delete rows from tables using DML statements like INSERT, UPDATE, and DELETE. It also covers transaction management using COMMIT, ROLLBACK, and SAVEPOINT statements to control when changes are committed to the database or rolled back. Key aspects covered include inserting new rows, updating and deleting specific rows or all rows, and handling integrity constraints and transactions.
The document describes the creation of multiple database tables to model business entities such as branches, employees, departments, products, accounts, transactions, customers, and more. Primary keys are defined for each table and foreign keys are specified to represent relationships between the tables. Sample data is then inserted into the Branch and Product tables.
The document provides an introduction to SQL and covers various SQL statements and operators including:
1. SQL statements like SELECT, INSERT, UPDATE, and DELETE are used to retrieve, modify and manipulate data in databases.
2. Operators like WHERE, BETWEEN, IN, LIKE and NULL are used to filter rows and compare values in conditions.
3. Functions and clauses such as SELECT, FROM, DISTINCT, GROUP BY, JOIN, ORDER BY, etc. are used to customize data retrieval and presentation.
This document introduces advanced usage of DBMS_STATS for column group extended statistics in Oracle. It demonstrates creating extended statistics on the columns (CITY, COUNTRY) in the SAMPLETABLE table, gathering new table statistics, and verifying the estimated rows is now correct for a query with predicates on both columns due to use of the extended statistics. It also shows tracing correlation between the columns and deleting the extended statistics.
The document discusses various schema object management techniques in Oracle including:
1) Adding, modifying, and dropping columns using the ALTER TABLE statement.
2) Adding constraints such as primary keys, foreign keys, and indexes.
3) Creating function-based indexes and dropping indexes.
4) Using Flashback operations to restore tables.
5) Creating and querying external tables stored in operating system files.
Constraints enforce rules at the table level to maintain data integrity. The main types of constraints are NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be created at table creation or added later using ALTER TABLE. Constraint information is stored in data dictionary views like USER_CONSTRAINTS and USER_CONS_COLUMNS which can be queried.
This document provides an overview of basic SQL statements and SQL*Plus commands. It covers capabilities of SELECT statements, executing a basic SELECT statement, writing SQL statements, selecting specific columns, using arithmetic expressions and operators, defining aliases and literals, eliminating duplicate rows, and interacting with SQL*Plus through commands like editing, saving, and running SQL statements.
The document discusses data manipulation language (DML) statements in SQL. It describes how to insert rows into a table using INSERT, update rows using UPDATE, and delete rows from a table using DELETE. It also covers transaction control using COMMIT to save changes permanently and ROLLBACK to undo pending changes back to a savepoint.
This document provides an overview of basic SQL statements and SQL*Plus commands. It describes how to select data from tables using the SELECT statement, perform calculations, and give columns aliases. It also summarizes how to describe table structures, edit SQL statements, and execute saved SQL files using SQL*Plus commands. The key capabilities of the SELECT statement are selection, projection, and joining data from multiple tables.
A view allows users to access data from one or more tables in a database. Views can simplify queries, restrict access to data, and present alternative perspectives of the underlying data. The document describes how to create simple and complex views, add constraints to views, modify data through views, and remove views from the database. Views provide a way to access data without allowing direct modification of the base tables.
This document defines data structures and logic for a report that retrieves and displays customer payment information from various tables. It declares data types to store records from different tables, selects data into internal tables based on selection screen criteria, and builds a final table combining the records for display in an ALV grid. Event handling is defined to handle clicks on program names in the grid.
This document discusses various SQL concepts including data types, data definition language (DDL), data manipulation language (DML), constraints, and transactions. It provides examples of creating tables with different data types, inserting, updating, and deleting data, setting constraints, and using transactions like commit and rollback. Key points covered include creating a table with a timestamp column, using case expressions, cursor for loops, and nested procedures and exception handling.
The document discusses how to create and manage database tables. Key topics covered include using CREATE TABLE to define table structure, ALTER TABLE to modify tables, DROP TABLE to remove tables, and TRUNCATE TABLE to delete all rows. Datatypes, naming conventions, adding comments, and joining tables with subqueries are also summarized.
The document describes several databases related to banking, insurance, orders, students, and books. It includes the structure of each database with table definitions and sample data. Various SQL queries are demonstrated to retrieve, update, insert and delete records in the tables to solve business problems for each database application.
This document describes various single-row functions in SQL that can manipulate or modify data. It discusses character, number, date, and conversion functions and provides examples of how to use functions like TO_CHAR, TO_NUMBER, ROUND, TRUNC, and DECODE in SELECT statements. Common uses of functions include performing calculations, formatting output, converting data types, and conditional processing of data. Nesting functions allows multiple operations to be applied sequentially.
This document defines a report that displays data from tables EKKO and EKPO in SAP in two interactive list screens (ALVs). It formats the fields to display from each table, builds the ALV controls, and defines a user command to navigate from the first screen showing EKKO data to a second screen showing linked EKPO detail lines.
This document discusses how to limit and sort data retrieved from a database table using SQL queries. It covers using the WHERE clause to restrict rows by conditions, comparison operators like = and BETWEEN, logical operators like AND and OR, and the ORDER BY clause to sort rows in ascending or descending order based on one or more columns. Examples are provided for each technique.
This program contains four routines that can be used to list and format the fields of a structured record. The routines are: list_record_fields, list_fields_with_cols, list_specific_fields, and convert_to_CSV. The list_specific_fields routine allows the user to select specific fields to list using selection options for field number and name. The convert_to_CSV routine generates a comma-separated value string from a structured record. These routines are intended to be called from other programs.
Lecture 4 sql {basics keys and constraints}Shubham Shukla
This document discusses different types of constraints in SQL including primary keys, foreign keys, unique constraints, and check constraints. It provides the syntax for creating each constraint using CREATE TABLE and ALTER TABLE statements. Primary keys enforce uniqueness and can be defined to include one or multiple columns. Foreign keys enforce referential integrity by linking columns in one table to columns in another table. Unique constraints require that the values in a column or set of columns are unique. Check constraints specify conditions that each row must satisfy.
This document discusses relational databases and the Oracle implementation. It introduces relational database concepts like tables, relations, keys and SQL. It describes how Oracle uses SQL and the PL/SQL programming language to interact with and manage data in a relational database management system. PL/SQL allows embedding SQL statements in procedural code blocks for data manipulation and queries.
This document discusses techniques for joining data from multiple database tables. It covers equijoins to retrieve matching records between tables, non-equijoins to retrieve records with non-equal conditions, outer joins to include non-matching records, and self joins to join a table to itself. Examples are provided to demonstrate how to write SQL statements to perform each type of join and include additional conditions.
This document discusses different types of ABAP reports including listing reports, drill-down reports, control break reports, and ALV reports. It provides examples of how to create control break reports using the AT FIRST, AT NEW, AT END OF, and AT LAST statements. It also summarizes how to display internal tables using the ALV grid and list viewers, including examples of using field catalogs to customize the display.
This document provides information about partitioning in MySQL 5.1 presented by Sarah Sproehnle and Giuseppe Maxia. It discusses partitioning types (range, hash, list, key), partitioning expressions, partitioning pruning, benchmarking partitions, partitioning with different storage engines, partitioning by dates, and optimizing queries on partitioned tables.
1) SAP solutions help companies listen to customers on social media to better understand sentiment and improve customer satisfaction, retention, and loyalty.
2) SAP helps sports teams like the San Francisco 49ers improve player evaluations and competitive advantage through analytics.
3) SAP allows companies to collaborate easily through cloud solutions to design and deliver great products faster.
Many Bay Area public schools lack library resources, so a book drive is being organized to collect new or gently used children's books ages 4-9 to stock school libraries and help students. Those interested can contact the organization for more details on donation criteria and how to get involved in donating books or funds to support literacy.
This document introduces advanced usage of DBMS_STATS for column group extended statistics in Oracle. It demonstrates creating extended statistics on the columns (CITY, COUNTRY) in the SAMPLETABLE table, gathering new table statistics, and verifying the estimated rows is now correct for a query with predicates on both columns due to use of the extended statistics. It also shows tracing correlation between the columns and deleting the extended statistics.
The document discusses various schema object management techniques in Oracle including:
1) Adding, modifying, and dropping columns using the ALTER TABLE statement.
2) Adding constraints such as primary keys, foreign keys, and indexes.
3) Creating function-based indexes and dropping indexes.
4) Using Flashback operations to restore tables.
5) Creating and querying external tables stored in operating system files.
Constraints enforce rules at the table level to maintain data integrity. The main types of constraints are NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be created at table creation or added later using ALTER TABLE. Constraint information is stored in data dictionary views like USER_CONSTRAINTS and USER_CONS_COLUMNS which can be queried.
This document provides an overview of basic SQL statements and SQL*Plus commands. It covers capabilities of SELECT statements, executing a basic SELECT statement, writing SQL statements, selecting specific columns, using arithmetic expressions and operators, defining aliases and literals, eliminating duplicate rows, and interacting with SQL*Plus through commands like editing, saving, and running SQL statements.
The document discusses data manipulation language (DML) statements in SQL. It describes how to insert rows into a table using INSERT, update rows using UPDATE, and delete rows from a table using DELETE. It also covers transaction control using COMMIT to save changes permanently and ROLLBACK to undo pending changes back to a savepoint.
This document provides an overview of basic SQL statements and SQL*Plus commands. It describes how to select data from tables using the SELECT statement, perform calculations, and give columns aliases. It also summarizes how to describe table structures, edit SQL statements, and execute saved SQL files using SQL*Plus commands. The key capabilities of the SELECT statement are selection, projection, and joining data from multiple tables.
A view allows users to access data from one or more tables in a database. Views can simplify queries, restrict access to data, and present alternative perspectives of the underlying data. The document describes how to create simple and complex views, add constraints to views, modify data through views, and remove views from the database. Views provide a way to access data without allowing direct modification of the base tables.
This document defines data structures and logic for a report that retrieves and displays customer payment information from various tables. It declares data types to store records from different tables, selects data into internal tables based on selection screen criteria, and builds a final table combining the records for display in an ALV grid. Event handling is defined to handle clicks on program names in the grid.
This document discusses various SQL concepts including data types, data definition language (DDL), data manipulation language (DML), constraints, and transactions. It provides examples of creating tables with different data types, inserting, updating, and deleting data, setting constraints, and using transactions like commit and rollback. Key points covered include creating a table with a timestamp column, using case expressions, cursor for loops, and nested procedures and exception handling.
The document discusses how to create and manage database tables. Key topics covered include using CREATE TABLE to define table structure, ALTER TABLE to modify tables, DROP TABLE to remove tables, and TRUNCATE TABLE to delete all rows. Datatypes, naming conventions, adding comments, and joining tables with subqueries are also summarized.
The document describes several databases related to banking, insurance, orders, students, and books. It includes the structure of each database with table definitions and sample data. Various SQL queries are demonstrated to retrieve, update, insert and delete records in the tables to solve business problems for each database application.
This document describes various single-row functions in SQL that can manipulate or modify data. It discusses character, number, date, and conversion functions and provides examples of how to use functions like TO_CHAR, TO_NUMBER, ROUND, TRUNC, and DECODE in SELECT statements. Common uses of functions include performing calculations, formatting output, converting data types, and conditional processing of data. Nesting functions allows multiple operations to be applied sequentially.
This document defines a report that displays data from tables EKKO and EKPO in SAP in two interactive list screens (ALVs). It formats the fields to display from each table, builds the ALV controls, and defines a user command to navigate from the first screen showing EKKO data to a second screen showing linked EKPO detail lines.
This document discusses how to limit and sort data retrieved from a database table using SQL queries. It covers using the WHERE clause to restrict rows by conditions, comparison operators like = and BETWEEN, logical operators like AND and OR, and the ORDER BY clause to sort rows in ascending or descending order based on one or more columns. Examples are provided for each technique.
This program contains four routines that can be used to list and format the fields of a structured record. The routines are: list_record_fields, list_fields_with_cols, list_specific_fields, and convert_to_CSV. The list_specific_fields routine allows the user to select specific fields to list using selection options for field number and name. The convert_to_CSV routine generates a comma-separated value string from a structured record. These routines are intended to be called from other programs.
Lecture 4 sql {basics keys and constraints}Shubham Shukla
This document discusses different types of constraints in SQL including primary keys, foreign keys, unique constraints, and check constraints. It provides the syntax for creating each constraint using CREATE TABLE and ALTER TABLE statements. Primary keys enforce uniqueness and can be defined to include one or multiple columns. Foreign keys enforce referential integrity by linking columns in one table to columns in another table. Unique constraints require that the values in a column or set of columns are unique. Check constraints specify conditions that each row must satisfy.
This document discusses relational databases and the Oracle implementation. It introduces relational database concepts like tables, relations, keys and SQL. It describes how Oracle uses SQL and the PL/SQL programming language to interact with and manage data in a relational database management system. PL/SQL allows embedding SQL statements in procedural code blocks for data manipulation and queries.
This document discusses techniques for joining data from multiple database tables. It covers equijoins to retrieve matching records between tables, non-equijoins to retrieve records with non-equal conditions, outer joins to include non-matching records, and self joins to join a table to itself. Examples are provided to demonstrate how to write SQL statements to perform each type of join and include additional conditions.
This document discusses different types of ABAP reports including listing reports, drill-down reports, control break reports, and ALV reports. It provides examples of how to create control break reports using the AT FIRST, AT NEW, AT END OF, and AT LAST statements. It also summarizes how to display internal tables using the ALV grid and list viewers, including examples of using field catalogs to customize the display.
This document provides information about partitioning in MySQL 5.1 presented by Sarah Sproehnle and Giuseppe Maxia. It discusses partitioning types (range, hash, list, key), partitioning expressions, partitioning pruning, benchmarking partitions, partitioning with different storage engines, partitioning by dates, and optimizing queries on partitioned tables.
1) SAP solutions help companies listen to customers on social media to better understand sentiment and improve customer satisfaction, retention, and loyalty.
2) SAP helps sports teams like the San Francisco 49ers improve player evaluations and competitive advantage through analytics.
3) SAP allows companies to collaborate easily through cloud solutions to design and deliver great products faster.
Many Bay Area public schools lack library resources, so a book drive is being organized to collect new or gently used children's books ages 4-9 to stock school libraries and help students. Those interested can contact the organization for more details on donation criteria and how to get involved in donating books or funds to support literacy.
Mediante el ejemplo de la cera, Descartes establece que la esencia de las cosas no desaparece por cambios externos y que el pensamiento no puede eliminar la realidad física. El famoso argumento "pienso, luego existo" demuestra que uno no podría pensar si no existiera.
Meograph is a video and storyboard service that provides website design and maintenance recommendations. It offers services like website design and maintenance to help clients with their digital needs while noting potential limitations and considerations for use. Meograph's services aim to help clients effectively develop and maintain an online presence through design and maintenance recommendations.
El documento habla sobre el síndrome mielodisplásico, una enfermedad de la médula ósea en la que se producen anormalidades en las células madre que dan lugar a las células sanguíneas. Se clasifica en varios subtipos según su gravedad y se manifiesta clínicamente con anemia y otros síntomas, lo que se confirma mediante análisis de sangre y médula ósea.
Este documento resume las biografías y roles de varios líderes y figuras clave de la Segunda Guerra Mundial, incluyendo Adolf Hitler, Benito Mussolini, Joseph Goebbels, Heinrich Himmler y Joseph Mengele. También describe brevemente la ideología nazi y algunos de los crímenes atroces cometidos contra los judíos y otros grupos.
Jaringan komputer terdiri dari komputer dan perangkat jaringan yang bekerja sama untuk berbagi sumber daya, berkomunikasi, dan mengakses informasi. Tujuannya adalah memfasilitasi permintaan dan penyediaan layanan antara klien dan server sesuai dengan arsitektur sistem client-server.
This document contains project proposals and descriptions for various buildings in Southern California, including an assembly hall concept in San Diego, a beach house in Santa Monica, a hospital building renovation in Culver City, residential homes in West Hills, Manhattan Beach, Torrance, and Studio City, and a concept for a Kingdom Hall of Jehovah's Witnesses building in Los Angeles.
O documento discute a importância da educação inclusiva, definindo-a como um processo que visa superar a exclusão de alunos com necessidades especiais através da inclusão destes na escola regular. Argumenta que a inclusão deve abranger todos os alunos, independentemente de deficiência, e que a escola deve se adaptar para atender as necessidades individuais de cada estudante.
Puntos, líneas y planos y mapa comceptualdiego3026
El documento describe diferentes tipos de imágenes geométricas básicas como puntos, líneas y planos, dividiendo cada categoría en subcategorías como puntos internos o externos, líneas horizontales, verticales u oblicuas, y planos panorámicos o generales.
Real Time Marketing - Social Analytics SummitFelipe Attílio
O documento descreve como o Espelho da Beleza, uma plataforma de monitoramento de mídias sociais do The Body Shop, ajuda a empresa a entender as demandas e desejos das consumidoras em relação à beleza em tempo real através da análise semântica de conversas online. O Espelho da Beleza fornece insights que são usados em todas as áreas da empresa, incluindo marketing digital, comunicação, comércio eletrônico e desenvolvimento de produtos.
This report displays client data in an ALV grid. It loads client data from the ZJONMU_CLI table into a internal table based on selection screen criteria. It then initializes the ALV grid by defining the field catalog, layout, sorting, and events. The grid is populated and displayed with the client data.
This document defines a report (ZREP_006) that retrieves and displays employee information from two tables (PA0001 and PA0185) based on selection criteria. The report allows the user to select employees by number, group, subgroup, or company code. It then displays the employee number, name, company code, group, and subgroup from table PA0001. For selected employees, it also retrieves and displays their identification number from table PA0185.
This report defines variables and data objects needed to display an ALV grid and handle user interactions. It retrieves data from a table into an internal table based on a user-selected table name and number of lines. It displays the data in an ALV grid and handles function codes to copy a selected line to a new internal table or save modified data back to the original table.
This JCL restores datasets from a DFDSS dump for the CA Unicenter/TNG Framework product version 2.2. It includes multiple steps to restore target datasets, distribution datasets, SMP/E libraries, the customer file, HFS files, and Book Manager files to their appropriate volumes after replacing site-specific variables. It also contains steps to update the SMP/E CSI and zones after restoration is complete.
This document provides examples of using ZMD_CONSTANT and ZHEADING in an ABAP report. It includes sample code to select data from the ZMD_CONSTANT table and load it into internal tables for use in selecting material records. It also shows the code used for the standard ZHEADING, which displays the report name, date, time, page number and other header information.
This document provides step-by-step instructions for setting up High Availability Disaster Recovery (HADR) with TSA using the db2haicu utility on DB2 databases on AIX/Linux nodes. It covers DB2 and TSA configuration, enabling HADR, restoring backups, checking states, and more. The target audience is customers setting up this solution.
This document contains ABAP code that uploads data from a file into a SAP system table. It uses GUI_UPLOAD to import the file data into an internal table. The data is then processed using BDC functionality to create and update records in table ZTAB_001 via transaction SM30. Open and close group forms are used to manage the BDC session.
This document contains ABAP code for a program that displays and allows editing of a table called YSRTMM using a dynpro screen. It includes modules for initializing and refreshing the screen, reading and writing data to the table, and handling user input commands. User commands allow adding, deleting, updating and refreshing the table data. Validation is performed to check for duplicate records before inserting or updating.
The document provides summaries of various Cassandra shell commands and CQL operations including:
1. Commands like HELP, CAPTURE, CONSISTENCY are used to get help, capture output, and set consistency levels. Keyspace operations like CREATE KEYSPACE, USE, ALTER KEYSPACE, and DROP KEYSPACE are used to create, modify and delete keyspaces.
2. Table operations such as CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE, CREATE INDEX and DROP INDEX allow creating, modifying and deleting tables as well as indexes.
3. CRUD operations allow inserting, updating, reading and deleting data using CQL statements. Collection, user-defined and type operations provide functionality
The document discusses how metadata such as constraints, datatypes, and null/not null properties impact query optimization. It shows that constraints provide additional information to the optimizer that can enable more efficient access paths. Datatypes and null/not null properties are also important as they influence cardinality estimates and memory usage, thus affecting the optimizer's choice of plan. Check constraints and not null constraints in particular allow rewriting of queries and use of indexes to evaluate filters more efficiently.
This document describes a device that interfaces between Diseqc and USALS compatible satellite receivers and older parabolic dish actuators. It takes power from the IF coax cable connecting the receiver and LNB. When it receives a valid command from the receiver, it powers up and executes the decoded command. The document includes schematics, code, and descriptions of functions for receiving and interpreting commands and controlling the actuator motors accordingly.
Lab08/Lab08.cppLab08/Lab08.cpp//**************************************************************************************************************
// FILE: Lab08.cpp
//
// DESCRIPTION: Contains the main() function. Instantiates a PointTest object which tests the Point class.
//
// AUTHORS: your-name (your-email-address)
// your-partner's-name (your-partners-email-address)
//
// COURSE: CSE100 Principles of Programming with C++, Fall 2015
//
// LAB INFO: Lab 8 Date/Time: your-lab-date-and-time TA: your-lab-ta
//--------------------------------------------------------------------------------------------------------------
// TESTING:
//
// TEST CASE 1:
// ------------
// TEST CASE INPUT DATA:
// Point p1 x = 11
// Point p1 y = 22
// Point p2 x = -33
// Point p2 y = -44
//
// EXPECTED OUTPUT GIVEN THE INPUT:
// The point p1 is (11, 22)
// The point p2 is (-33, -44)
// The distance between the points is 79.322
// Moving point p1...The point p1 is now at (100, 200)
// The distance between the points is 277.894
// Moving point p2...The point p2 is now at (300, 400)
// The distance between the points is 282.843
//
// OBSERVED OUTPUT:
// Document the output from your program when you perform this test case
//
// TEST CASE RESULT: Document PASS or FAIL
//
// TEST CASE 2:
// ------------
// TEST CASE INPUT DATA:
// Point p1 x = ???
// Point p1 y = ???
// Point p2 x = ???
// Point p2 y = ???
//
// EXPECTED OUTPUT GIVEN THE INPUT:
// ??? Document the expected output ???
//
// OBSERVED OUTPUT:
// ??? Document the output from your program when you perform this test case ???
//
// TEST CASE RESULT: ??? Document PASS or FAIL ???
//**************************************************************************************************************
#include"PointTest.hpp"
//--------------------------------------------------------------------------------------------------------------
// FUNCTION: main()
//
// DESCRIPTION
// Starting point for the program.
//
// PSEUDOCODE
// Define a PointTest object named pointTest calling the default ctor.
// Call run() on the pointTest object.
// Return 0.
//--------------------------------------------------------------------------------------------------------------
???
Lab08/Point.cppLab08/Point.cpp//**************************************************************************************************************
// FILE: Point.cpp
//
// DESCRIPTION: Implementation of the Point class. See Point.hpp for the class declaration.
//
// AUTHORS: your-name (your-email-address)
// your-partner's-name (your-partners-email-address)
//
// COURSE: CSE100 Principles of Programming with C++, Fall 2015
//
// LAB INFO: Lab 8 Date/Time: your-lab-date-and-time TA: your-lab-ta
//**************************************************************************************************************
#include<cmath>// For sqrt()
#include<sstream>// For stringstre ...
Organic Gardens SQL Database Schema By Christopher KaczorChristopher Kaczor
This document contains the SQL database schema and stored procedures created by Christopher Kaczor to be used with Microsoft SQL Server. It divides the code into 9 parts which need to be copied and pasted into SQL Server in numerical order to properly create the database tables, stored procedures, and populate the data. The code creates tables for vendors, items, online orders, and online customers and stored procedures to add data to each table. It also includes some additional stored procedures for analyzing order data.
The document describes a wage accounting system for two divisions - Worsted and Woollen. It includes details of the system users, master tables to store employee and organizational data, transaction tables to log attendance, and reports that can be generated. The system is designed to track employee attendance on a daily basis and calculate wages based on attendance, leaves, and overtime. Department supervisors can make entries for employee details, attendance, leaves and overtime for their departments.
The document describes HiveQL commands for creating, altering, and dropping databases, tables, views, and indexes. It also covers built-in functions, SELECT queries with filters, sorting, grouping, and joins. Key commands include CREATE DATABASE, CREATE TABLE, LOAD DATA, ALTER TABLE, DROP TABLE, SELECT, GROUP BY, and JOIN.
1. TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
*----------------
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
field_style TYPE lvc_t_styl, "FOR DISABLE
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE lvc_s_fcat,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE lvc_s_layo, "slis_layout_alv,
gd_repid LIKE sy-repid.
************************************************************************
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM set_specific_field_attributes.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*&---------------------------------------------------------------------*
*& Form BUILD_FIELDCATALOG
3. wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-scrtext_m = 'PO quantity'.
wa_fieldcat-col_pos = 5.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-scrtext_m = 'Order Unit'.
wa_fieldcat-col_pos = 6.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-scrtext_m = 'Net Price'.
wa_fieldcat-edit = 'X'. "sets whole column to be editable
wa_fieldcat-col_pos = 7.
wa_fieldcat-outputlen = 15.
wa_fieldcat-datatype = 'CURR'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'PEINH'.
wa_fieldcat-scrtext_m = 'Price Unit'.
wa_fieldcat-col_pos = 8.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " BUILD_FIELDCATALOG
*&---------------------------------------------------------------------*
*& Form BUILD_LAYOUT
*&---------------------------------------------------------------------*
* Build layout for ALV grid report
*----------------------------------------------------------------------*
FORM build_layout.
* Set layout field for field attributes(i.e. input/output)
gd_layout-stylefname = 'FIELD_STYLE'.
4. gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*&---------------------------------------------------------------------*
*& Form DISPLAY_ALV_REPORT
*&---------------------------------------------------------------------*
* Display report using ALV grid
*----------------------------------------------------------------------*
FORM display_alv_report.
gd_repid = sy-repid.
* call function 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gd_repid
* i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = gd_layout
it_fieldcat_lvc = it_fieldcat
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*&---------------------------------------------------------------------*
*& Form DATA_RETRIEVAL
*&---------------------------------------------------------------------*
* Retrieve data form EKPO table and populate itab it_ekko
*----------------------------------------------------------------------*
5. FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
*&---------------------------------------------------------------------*
*& Form set_specific_field_attributes
*&---------------------------------------------------------------------*
* populate FIELD_STYLE table with specific field attributes
*----------------------------------------------------------------------*
form set_specific_field_attributes .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
* Populate style variable (FIELD_STYLE) with style properties
*
* The NETPR field/column has been set to editable in the fieldcatalog...
* The following code sets it to be disabled(display only) if 'NETPR'
* is gt than 10.
LOOP AT it_ekko INTO wa_ekko.
IF wa_ekko-netpr GT 10.
ls_stylerow-fieldname = 'NETPR' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
"set field to disabled
APPEND ls_stylerow TO wa_ekko-field_style.
MODIFY it_ekko FROM wa_ekko.
ENDIF.
ENDLOOP.
endform. " set_specific_field_attributes
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
DATA:
ok_code LIKE sy-ucomm,
6. save_ok LIKE sy-ucomm,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gs_layout TYPE lvc_s_layo,
g_max TYPE i VALUE 100.
*§1.Extend your output table for a field, e.g., CELLTAB, that holds
* information about the edit status of each cell for the
* corresponding row (the table type is SORTED!).
DATA: BEGIN OF gt_outtab OCCURS 0. "with header line
INCLUDE STRUCTURE sflight.
DATA: celltab TYPE lvc_t_styl.
DATA: END OF gt_outtab.
*---------------------------------------------------------------------*
* MAIN *
*---------------------------------------------------------------------*
CALL SCREEN 100.
*---------------------------------------------------------------------*
* MODULE PBO OUTPUT *
*---------------------------------------------------------------------*
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
PERFORM select_data_and_init_style.
*§3.Provide the fieldname of the celltab field by using field
* STYLEFNAME of the layout structure.
gs_layout-stylefname = 'CELLTAB'.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
7. is_layout = gs_layout
CHANGING
it_outtab = gt_outtab[].
ENDIF.
ENDMODULE. "pbo OUTPUT
*---------------------------------------------------------------------*
* MODULE PAI INPUT *
*---------------------------------------------------------------------*
MODULE pai INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN OTHERS.
* do nothing
ENDCASE.
ENDMODULE. "pai INPUT
*---------------------------------------------------------------------*
* FORM EXIT_PROGRAM *
*---------------------------------------------------------------------*
FORM exit_program.
LEAVE PROGRAM.
ENDFORM. "exit_program
*&---------------------------------------------------------------------*
*& Form SELECT_DATA_AND_INIT_STYLE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM select_data_and_init_style.
DATA: lt_sflight TYPE TABLE OF sflight WITH HEADER LINE,
lt_celltab TYPE lvc_t_styl,
l_index TYPE i.
SELECT * FROM sflight INTO TABLE lt_sflight UP TO g_max ROWS.
8. * move corresponding fields from lt_sflight to gt_outtab
LOOP AT lt_sflight.
MOVE-CORRESPONDING lt_sflight TO gt_outtab.
APPEND gt_outtab.
ENDLOOP.
*§2.After selecting data, set edit status for each row in a loop
* according to field SEATSMAX.
LOOP AT gt_outtab.
l_index = sy-tabix.
REFRESH lt_celltab.
IF gt_outtab-seatsmax GE 300.
PERFORM fill_celltab USING 'RW'
CHANGING lt_celltab.
ELSE.
PERFORM fill_celltab USING 'RO'
CHANGING lt_celltab.
ENDIF.
*§2c.Copy your celltab to the celltab of the current row of gt_outtab.
INSERT LINES OF lt_celltab INTO TABLE gt_outtab-celltab.
MODIFY gt_outtab INDEX l_index.
ENDLOOP.
ENDFORM. " SELECT_DATA_AND_INIT_STYLE
*&---------------------------------------------------------------------*
*& Form FILL_CELLTAB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_PT_CELLTAB text
*----------------------------------------------------------------------*
FORM fill_celltab USING value(p_mode)
CHANGING pt_celltab TYPE lvc_t_styl.
DATA: ls_celltab TYPE lvc_s_styl,
l_mode TYPE raw4.
* This forms sets the style of column 'PRICE' editable
* according to 'p_mode' and the rest to read only either way.
9. IF p_mode EQ 'RW'.
*§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell
* to status "editable".
l_mode = cl_gui_alv_grid=>mc_style_enabled.
ELSE. "p_mode eq 'RO'
*§2b.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_DISABLED to set a cell
* to status "non-editable".
l_mode = cl_gui_alv_grid=>mc_style_disabled.
ENDIF.
ls_celltab-fieldname = 'CARRID'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'CONNID'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'FLDATE'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'PRICE'.
ls_celltab-style = l_mode.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'CURRENCY'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'PLANETYPE'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'SEATSMAX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'SEATSOCC'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
10. INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'PAYMENTSUM'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ENDFORM. " FILL_CELLTAB
*&---------------------------------------------------------------------*
*& Form SWITCH_EDIT_MODE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM switch_edit_mode.
IF grid1->is_ready_for_input( ) EQ 0.
* set edit enabled cells ready for input
CALL METHOD grid1->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
* lock edit enabled cells against input
CALL METHOD grid1->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
ENDFORM. " SWITCH_EDIT_MODE