zsql: A tool to execute SQL statements directly in sap

Size: px
Start display at page:

Download "zsql: A tool to execute SQL statements directly in sap"

Transcription

1 in zsql: A tool to execute SQL statements directly in sap Posted by Basar Ozgur Kahraman in ABAP Development on Oct 9, :06:43 AM Sometimes i need to write sql statements and get results immediately in abap. To handle this requirement, i create a test program, write my sql in it and debug to investigate results. It's difficult and time consuming work so I have developed an SQL tool for ABAP Programmers to allow them to run select statements directly in SAP, confirm or discover relationships and see data side by side. Installation: 1- Create an executable program and named it "ZSQL" in se38 2- Download attached zsql.txt.zip file and Upload into zsql(or copy&paste) 3- Create screen '0100' 4- Go into screen '0100', choose "Flow Logic" tab and add flow logic code as below 5- Go to layout of screen and add a "Custom Control" and name it "CC_SQL" 6- In layout add two buttons -Run: FctCode: "RUN" -Exit: FctCode: "EXIT" 7- Activate screen 8- Activate program Flow Logic Code: PROCESS BEFORE OUTPUT. MODULE status_0100. PROCESS AFTER INPUT. MODULE user_command_0100. Notice: - Each FROM/JOIN clause must be in new line - Table names&aliases and From/Join clauses must be in the same line - Don't use SELECT SINGLE - Don't use INTO statement - Doesn't support aggregate functions(e.g. SUM, MAX, AVG) - DELETE/UPDATE statements are supported only in test systems Examples:

2 *

3 * *

4 Programm: *& Report ZSQL *& *& Developer: Basar Ozgur REPORT zsql. TYPES: BEGIN OF typ_tablename, tabname LIKE dd02l tabname, alias LIKE dd02l tabname, END OF typ_tablename. TYPES: typ_it_tablename TYPE STANDARD TABLE OF typ_tablename. TYPES: BEGIN OF typ_selfields, tabname LIKE lvc_s_fcat tabname, fieldname LIKE lvc_s_fcat fieldname, END OF typ_selfields. TYPES: typ_it_selfields TYPE STANDARD TABLE OF typ_selfields. DATA: cc_sql TYPE REF TO cl_gui_custom_container, sqltext TYPE REF TO cl_gui_textedit. DATA: BEGIN OF it_sql OCCURS 0, tdline LIKE tline tdline, END OF it_sql. DATA: gv_changeallowed TYPE boolean. INITIALIZATION. CALL SCREEN *& Form CREATE_DYNAMIC_SQL

5 * > p1 text * < p2 text FORM create_dynamic_sql TABLES p_it_sql STRUCTURE it_sql CHANGING p_program TYPE string p_isselectquery TYPE boolean. TYPES: _typ_pline(72). DATA: _message(128), _line TYPE i, _it_pline TYPE TABLE OF _typ_pline WITH HEADER LINE. CLEAR: p_program, p_isselectquery. _it_pline = 'REPORT ZSQL_INNER_DYNAMICPRG.'. _it_pline = 'FORM call_sql'. _it_pline = 'TABLES p_it_return'. _it_pline = 'CHANGING p_subrc LIKE sy subrc.'. _it_pline = 'REFRESH p_it_return. p_subrc = 4.'. READ TABLE p_it_sql INDEX 1. IF p_it_sql tdline CS 'SELECT'. p_isselectquery = 'X'. LOOP AT p_it_sql. IF p_it_sql tdline CS 'FROM' AND p_isselectquery = 'X'. _it_pline = 'INTO CORRESPONDING FIELDS OF TABLE p_it_return'. _it_pline = p_it_sql tdline. _it_pline = '.'. _it_pline = 'p_subrc = sy subrc.'. _it_pline = ''. GENERATE SUBROUTINE POOL _it_pline NAME p_program MESSAGE _message LINE _line. IF sy subrc <> 0. MESSAGE _message TYPE 'E'.

6 " CREATE_DYNAMIC_SQL *& Module STATUS_0100 OUTPUT MODULE status_0100 OUTPUT. * SET PF STATUS 'xxxxxxxx'. * SET TITLEBAR 'xxx'. IF sqltext IS INITIAL. CREATE OBJECT cc_sql EXPORTING container_name = 'CC_SQL' EXCEPTIONS cntl_error = 1 cntl_system_error = 2 create_error = 3 lifetime_error = 4 lifetime_dynpro_dynpro_link = 5 OTHERS = 6. CREATE OBJECT sqltext EXPORTING wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position parent = cc_sql EXCEPTIONS error_cntl_create = 1 error_cntl_init = 2 error_cntl_link = 3 error_dp_create = 4 gui_type_not_supported = 5 OTHERS = 6. ENDMODULE. " STATUS_0100 OUTPUT *& Module USER_COMMAND_0100 INPUT MODULE user_command_0100 INPUT. CASE sy ucomm. WHEN 'EXIT'. LEAVE TO SCREEN 0. WHEN 'RUN'. PERFORM run. ENDCASE. ENDMODULE. " USER_COMMAND_0100 INPUT *& Form RUN * > p1 text * < p2 text

7 FORM run. DATA: _it_fcat TYPE lvc_t_fcat, _cl_salv TYPE REF TO cl_salv_table, _cl_func TYPE REF TO cl_salv_functions_list, _program TYPE string, _subrc LIKE sy subrc, _isselectquery TYPE boolean. DATA: _it_newtable TYPE REF TO data. FIELD SYMBOLS: <_it_dyntable> TYPE STANDARD TABLE. REFRESH it_sql. CALL METHOD sqltext >get_text_as_r3table IMPORTING table = it_sql[]. * Delete initial lines DELETE it_sql WHERE tdline IS INITIAL. * Translate SQL to upper case for string operations LOOP AT it_sql. TRANSLATE it_sql tdline TO UPPER CASE. CONDENSE it_sql tdline. MODIFY it_sql. CHECK it_sql[] IS NOT INITIAL. * Check operation is allowed PERFORM check_operation TABLES it_sql. * Generate Subroutine pool SQL PERFORM create_dynamic_sql TABLES it_sql CHANGING _program _isselectquery. * Create fieldcatalog for SQL output PERFORM create_fieldcatalog TABLES it_sql _it_fcat. * Create output table CALL METHOD cl_alv_table_create=>create_dynamic_table EXPORTING it_fieldcatalog = _it_fcat IMPORTING ep_table = _it_newtable. ASSIGN _it_newtable >* TO <_it_dyntable>. * Call SQL Query and get results to output table PERFORM ('CALL_SQL') IN PROGRAM (_program) TABLES <_it_dyntable> CHANGING _subrc IF FOUND. IF _subrc IS NOT INITIAL. MESSAGE 'No records found!! / Operation cant executed' TYPE 'W'. EXIT. ELSEIF <_it_dyntable>[] IS INITIAL. MESSAGE 'Operation executed' TYPE 'I'. EXIT.

8 * ALV output CALL METHOD cl_salv_table=>factory IMPORTING r_salv_table = _cl_salv CHANGING t_table = <_it_dyntable>. _cl_func = _cl_salv >get_functions( ). _cl_func >set_all( ). _cl_salv >display( ). " RUN *& Form CREATE_FIELDCATALOG * >P_IT_SQL text FORM create_fieldcatalog TABLES p_it_sql STRUCTURE it_sql p_it_fcat STRUCTURE lvc_s_fcat. DATA: BEGIN OF _it_dbfields OCCURS 0, tabname LIKE dd02l tabname, itdbfield TYPE STANDARD TABLE OF dbfield, END OF _it_dbfields. DATA: _dbfield TYPE dbfield. DATA: _it_tablename TYPE TABLE OF typ_tablename WITH HEADER LINE, _it_selfields TYPE TABLE OF typ_selfields WITH HEADER LINE. REFRESH p_it_fcat. * Get table names PERFORM get_tables_in_sql TABLES p_it_sql _it_tablename. * Get return fields of sql PERFORM get_fields_in_sql TABLES p_it_sql _it_selfields. * Convert Alias to TableName LOOP AT _it_tablename WHERE alias IS NOT INITIAL. _it_selfields tabname = _it_tablename tabname. MODIFY _it_selfields TRANSPORTING tabname WHERE tabname = _it_tablename alias. * Whole fields of tables in sql LOOP AT _it_tablename. _it_dbfields tabname = _it_tablename tabname. CALL FUNCTION 'DB_GET_TABLE_FIELDS' EXPORTING tabname = _it_tablename tabname TABLES dbfields = _it_dbfields itdbfield. APPEND _it_dbfields. CLEAR _it_dbfields.

9 * Fill fieldcatalog IF _it_selfields[] IS INITIAL. * Select * case fieldcatalog LOOP AT _it_dbfields. LOOP AT _it_dbfields itdbfield INTO _dbfield. READ TABLE p_it_fcat WITH KEY fieldname = _dbfield name. CHECK sy subrc <> 0. p_it_fcat fieldname = _dbfield name. p_it_fcat ref_table = _it_dbfields tabname. p_it_fcat ref_field = _dbfield name. APPEND p_it_fcat. ELSE. * Select fields case fieldcatalog LOOP AT _it_selfields. READ TABLE p_it_fcat WITH KEY fieldname = _it_selfields fieldname. CHECK sy subrc <> 0. p_it_fcat fieldname = _it_selfields fieldname. p_it_fcat ref_table = _it_selfields tabname. p_it_fcat ref_field = _it_selfields fieldname. APPEND p_it_fcat. * Fill ref_table value of row, if they initial LOOP AT p_it_fcat WHERE ref_table IS INITIAL. LOOP AT _it_dbfields. READ TABLE _it_dbfields itdbfield INTO _dbfield WITH KEY name = p_it_fcat ref_field. CHECK sy subrc = 0. p_it_fcat ref_table = _it_dbfields tabname. EXIT. MODIFY p_it_fcat. " CREATE_FIELDCATALOG *& Form get_tables_in_sql * >P_IT_SQL text * >P_IT_TABLENAME text FORM get_tables_in_sql TABLES p_it_sql STRUCTURE it_sql p_it_tablename TYPE typ_it_tablename. DATA: BEGIN OF _it_split OCCURS 0, str LIKE lvc_s_fcat tabname, END OF _it_split. REFRESH p_it_tablename. LOOP AT p_it_sql WHERE tdline CS 'FROM' OR tdline CS 'JOIN' OR tdline CS 'UPDATE'.

10 * TRANSLATE p_it_sql tdline USING '( ) '. REFRESH _it_split. SPLIT p_it_sql tdline+sy fdpos AT space INTO TABLE _it_split. DELETE _it_split WHERE str IS INITIAL OR str = '(' OR str = ')'. CLEAR _it_split. READ TABLE _it_split INDEX 2. CHECK _it_split str IS NOT INITIAL. p_it_tablename tabname = _it_split str. CLEAR _it_split. READ TABLE _it_split INDEX 3. IF _it_split str = 'AS'. CLEAR _it_split. READ TABLE _it_split INDEX 4. p_it_tablename alias = _it_split str. COLLECT p_it_tablename. CLEAR p_it_tablename. " GET_TABLES_IN_SQL *& Form GET_FIELDS_IN_SQL * >P_P_IT_SQL text * >P IT_SELFIELDS text FORM get_fields_in_sql TABLES p_it_sql STRUCTURE it_sql p_it_selfields TYPE typ_it_selfields. DATA: BEGIN OF _it_split OCCURS 0, str LIKE lvc_s_fcat tabname, END OF _it_split. DATA: _willexit TYPE boolean. REFRESH p_it_selfields. * Get Selection Fields LOOP AT p_it_sql. CONDENSE p_it_sql tdline. IF p_it_sql tdline CS 'FROM' OR p_it_sql tdline CS 'UPDATE'. IF sy fdpos = 0. EXIT. p_it_sql tdline = p_it_sql tdline(sy fdpos). _willexit = 'X'.

11 REFRESH _it_split. SPLIT p_it_sql tdline AT space INTO TABLE _it_split. DELETE _it_split WHERE str IS INITIAL OR str = 'SELECT' OR str = 'SINGLE' OR str = '*' OR str = 'INSERT' OR str = 'UPDATE' OR str = 'MODIFY' OR str = 'DELETE'. LOOP AT _it_split. IF _it_split str CA '~'. SPLIT _it_split str AT '~' INTO p_it_selfields tabname p_it_selfields fieldname. ELSE. p_it_selfields fieldname = _it_split str. APPEND p_it_selfields. CLEAR p_it_selfields. CHECK _willexit = 'X'. EXIT. " GET_FIELDS_IN_SQL *& Form CHECK_OPERATION * >P_IT_SQL text FORM check_operation TABLES p_it_sql STRUCTURE it_sql. DATA: _ccnocliind LIKE t000 ccnocliind. IF gv_changeallowed IS INITIAL. SELECT SINGLE ccnocliind INTO _ccnocliind FROM t000 WHERE mandt = sy mandt. IF sy subrc = 0 AND _ccnocliind IS INITIAL. gv_changeallowed = 'X'. ELSE. gv_changeallowed = ' '. CHECK gv_changeallowed <> 'X'. READ TABLE p_it_sql INDEX 1. IF p_it_sql tdline CS 'DELETE' OR p_it_sql tdline CS 'UPDATE'. MESSAGE 'DELETE/UPDATE operations allowed only in Test Systems' TYPE 'E'. " CHECK_OPERATION

REPORT zalv_fcat. * Output table T006 structure declaration. TYPES : BEGIN OF ty_t006. INCLUDE STRUCTURE t006. TYPES : END OF ty_t006.

REPORT zalv_fcat. * Output table T006 structure declaration. TYPES : BEGIN OF ty_t006. INCLUDE STRUCTURE t006. TYPES : END OF ty_t006. *& Report ZALV_FCAT * *& Author : Swarna.S *& AS : ALV report which displays the contents of the table T006 *& (as a docking container in the bottom) along with the *& editable ALV which contains the ALV

More information

ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid

ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid ABAP Code Sample to Attach F1 and F4 Help Fields in ALV Grid Code samples are intended for educational use only, not deployment They are untested and unsupported by SAP SAP disclaims all liability to any

More information

ABAP Code Sample to Display Data in ALV Grid Using Object-Oriented Programming

ABAP Code Sample to Display Data in ALV Grid Using Object-Oriented Programming ABAP Code Sample to Display Data in ALV Grid Using Object-Oriented Programming Code samples are intended for educational use only, not deployment. They are untested and unsupported by SAP. SAP disclaims

More information

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0 Applies To: Usage of Table Control in ABAP Summary Normally we use wizard if we are working with table control. This document helps us how to create a table control without using a wizard and how to manipulate

More information

ABAP Code Sample for Data Browser Using ALV Grid

ABAP Code Sample for Data Browser Using ALV Grid ABAP Code Sample for Data Browser Using ALV Grid Applies To: ABAP Summary : Here is a code sample that performs the operation similar to Data Browser. This adopts the simplest way to display any table

More information

REPORT z_tablestcode. *ALV type pools declarations. TYPE-POOLS : slis. *Internal table and work area declarations for dd02l / dd02t /tstc

REPORT z_tablestcode. *ALV type pools declarations. TYPE-POOLS : slis. *Internal table and work area declarations for dd02l / dd02t /tstc *& Report ZALV_TABLESTCODE * *& Author Swarna.S. *& AS : ALV report to display the dictionary objects *& (tables/structures/views of all types of delivery classes) *& used by a TRANSACTION.The ALV is made

More information

SAP NOTEBOOK - ABAP INTERVIEW QUESTIONS ANSWERS TIPS. Hybris and SAP

SAP NOTEBOOK - ABAP INTERVIEW QUESTIONS ANSWERS TIPS. Hybris and SAP SAP NOTEBOOK - ABAP INTERVIEW QUESTIONS ANSWERS TIPS Hybris and SAP Hybris is a e-commerce product which is now a part of SAP after SAP's acquisition. Hybris' strong suit is supporting business-to-business

More information

Vertical Tab Control in SAP

Vertical Tab Control in SAP SDN Contribution Vertical Tab Control in SAP Applies to: SAP ABAP Summary This program uses the vertical tab control class CL_GUI_CONTAINER_BAR. This control can be used to display data in vertical tabs.

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

Attachment of note CR 642 Additional fields in customer and vendor master data

Attachment of note CR 642 Additional fields in customer and vendor master data Attachment of note 1599213 CR 642 Additional fields in customer and vendor master data Changes in Release 46C 1 Table of Content Attachment of note 1599213... 1 1 Table of Content... 2 2 Customer Master...

More information

Example Implementation for the Sales Order Monitor BAdI

Example Implementation for the Sales Order Monitor BAdI Example Implementation for the Sales Order Monitor BAdI Table of Contents Introduction... 2 Business Add-In SD_OSO_MONITOR... 2 BADI Implementation Interface IF_SD_OSO_MONITOR... 3 Method IF_SD_OSO_MONITOR~CHANGE_SELECTION_TABLE...

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

FUNCTION MODULE. BAPI are RFC enabled function modules. Might Be Remote Enabled or May not be Remote Enabled

FUNCTION MODULE. BAPI are RFC enabled function modules. Might Be Remote Enabled or May not be Remote Enabled FUNCTION MODULE Might Be Remote Enabled or May not be Remote Enabled RFC are direct system call Function modules are modularization elements in the ABAP programming language In web developments, RFC can

More information

Dynamically Enable / Disable Fields in Table Maintenance Generator

Dynamically Enable / Disable Fields in Table Maintenance Generator Dynamically Enable / Disable Fields in Table Maintenance Generator Applies to: SAP ABAP. For more information, visit the ABAP homepage. Summary This article demonstrates on how to Enable / Disable fields

More information

Function Module to Create Logo

Function Module to Create Logo Applies To: SAP 4.0-4.7 Summary Utilities Function Module to create a Logo on a Custom Control Container. By: Arpit Nigam Company and Title: Hexaware Tech. Ltd., SAP Consultant Date: 26 Sep 2005 Table

More information

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer ABAP Interview Questions & Answers Set 4 tyuiopasdfghjklzxcvbnmqwertyuiopas

More information

STIDistrict Query (Basic)

STIDistrict Query (Basic) STIDistrict Query (Basic) Creating a Basic Query To create a basic query in the Query Builder, open the STIDistrict workstation and click on Utilities Query Builder. When the program opens, database objects

More information

SAP ABAP Training Course Content :

SAP ABAP Training Course Content : SAP ABAP Training Course Content : Topics Covered: Introduction to ERP Introduction to SAP & R/3 Architecture Introduction to ABAP/4 What is ABAP? Logon to SAP Environment Transaction Codes Multitasking

More information

Function Modules Objective The following section is intended to explain: What function modules are Components of function modules

Function Modules Objective The following section is intended to explain: What function modules are Components of function modules Function Modules Objective The following section is intended to explain: What function modules are Components of function modules Testing and releasing of function modules Function Modules Function modules

More information

C_TAW12_740

C_TAW12_740 C_TAW12_740 Passing Score: 800 Time Limit: 0 min Exam A QUESTION 1 You want to add a field ZZPRICE to the SAP standard transparent table EKKO. Which of the following actions results in an enhancement of

More information

ABAP Code Sample to Report IDOCs in Error

ABAP Code Sample to Report IDOCs in Error Applies To: SAP 4.6 C and SAP 4.7 Enterprise Edition Summary This report displays all the error IDOCs for both INBOUND and OUTBOUND based on message type, it also having a provision to drill down the number

More information

Slider (2) Dynpro. Screenshot

Slider (2) Dynpro. Screenshot Slider (2) Noch eine Variante des Sliders. Diesmal mithilfe einer Windows-OCX-Bibliothek. Der Slider hat keine Beschriftung, hat aber den Vorteil, dass auf eine Wertänderung sofort reagiert werden kann.

More information

SAP BW Copy Existing DTP for Data Targets

SAP BW Copy Existing DTP for Data Targets SAP BW Copy Existing DTP for Data Targets Applies to: SAP BI Consultants with ABAP Knowledge. For more information, visit the EDW HomePage. Summary Copy existing DTP to a new one in not possible in SAP

More information

Setting Attributes Dynamically

Setting Attributes Dynamically Setting Attributes Dynamically PDF download from SAP Help Portal: http://help.sap.com/saphelp_470/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm Created on February 22, 2015 The documentation

More information

Procedure to Trigger Events in Remote System Using an ABAP Program

Procedure to Trigger Events in Remote System Using an ABAP Program Procedure to Trigger Events in Remote System Using an ABAP Program Applies to: SAP BW 3.x, SAP BI 7.x, SAP ECC, APO Systems. Summary This document gives the procedure to trigger events in a Remote System

More information

How to Attach Documents to Any Custom Program Using Generic Object Services

How to Attach Documents to Any Custom Program Using Generic Object Services SDN Contribution How to Attach Documents to Any Custom Program Using Generic Object Services Applies to: SAP R/3 4.6C Summary This sample code describes the steps needed to easily add file attachment feature

More information

INTERVIEW QUESTIONS SAP ABAP (SAMPLE) May 23,

INTERVIEW QUESTIONS SAP ABAP (SAMPLE) May 23, INTERVIEW QUESTIONS SAP ABAP (SAMPLE) May 23, 2006 www.examguru.net DO NOT COPY OR DUPLICATE Paper Copies of These Materials or Software Files Downloaded From Website For Use by Anyone Other Than Original

More information

Please maintain the following steps:

Please maintain the following steps: Please maintain the following steps: I. Editing existing DDIC object: a. Structure '/UIM/S_MASK_E' 1. Goto transaction SE11. 2. Select '/UIM/S_MASK_E' as Data type. 3. Click change or press F6. 4. Change

More information

Adding Custom Fields to Contract Account Screen

Adding Custom Fields to Contract Account Screen Adding Custom Fields to Contract Account Screen Applies to: This article applies to ISU-FICA & ABAP. For more information, visit the ABAP homepage. Summary This article explains how to add custom fields

More information

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer

qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer ABAP Interview Questions & Answers Set 9 tyuiopasdfghjklzxcvbnmqwertyuiopas

More information

Chapter 12 Introduction to Dialog Programming

Chapter 12 Introduction to Dialog Programming Chapter 12 Introduction to Dialog Programming Overview and interaction of com ponents Basic techniques of dialog programming Defining interfaces with the M enu Painter Chapter 12 Objectives Interaction

More information

SAP Standard Reporting Quick Reference Guide

SAP Standard Reporting Quick Reference Guide Standard reports are run within the SAP application and are pre-delivered by SAP to fulfill basic legal, financial, and everyday business reporting requirements. This guide demonstrates features common

More information

SAP ABAP Interview Questions Part 1

SAP ABAP Interview Questions Part 1 1 of 13 04-Nov-13 12:49 AM SAP ABAP Interview Questions Part 1 Looking for ABAP interview questions? You have come to THE RIGHT place. I have planned to continuously update this blog post. So if you have

More information

REPORT zsscr. *TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS TYPE-POOLS : vrm, icon. *SELECTION SCREEN FIELDS TABLES : sscrfields.

REPORT zsscr. *TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS TYPE-POOLS : vrm, icon. *SELECTION SCREEN FIELDS TABLES : sscrfields. *& Report Z_sscr * *& * *& AS : DYNAMIC Selection screen based on user clicks on the radiobutton* *& * REPORT zsscr. *TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS TYPE-POOLS : vrm, icon.

More information

SAP Container HELP.BCCIDOCK. Release 4.6C

SAP Container HELP.BCCIDOCK. Release 4.6C HELP.BCCIDOCK Release 4.6C SAP AG Copyright Copyright 2001 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission

More information

SAP Control Framework

SAP Control Framework HELP.BCCIGOF Release 4.6C SAP AG Copyright Copyright 2001 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission

More information

C_TAW12_740

C_TAW12_740 C_TAW12_740 Passing Score: 800 Time Limit: 4 min Exam A QUESTION 1 Which of the foldynpro application to transaction database data to the user interface? A. Interface controller B. Supply function C. Inbound

More information

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports Applies to: This Article is intended for all those ABAPers who are interested in creating SAP-SETS and use them in ABAP. For more information,

More information

SAP BW - PSA/Change Log Deletion Governance

SAP BW - PSA/Change Log Deletion Governance SAP BW - PSA/Change Log Deletion Governance Applies to: SAP Net Weaver 2004s BI 7.0 Ehp1 SP 05. For more information, visit EDW homepage Summary This article suggests importance of PSA/Change log deletion

More information

A Step-by-Step Guide on Asynchronous RFC - to -JDBC Scenario Using SAP PI 7.0

A Step-by-Step Guide on Asynchronous RFC - to -JDBC Scenario Using SAP PI 7.0 A Step-by-Step Guide on Asynchronous RFC - to -JDBC Scenario Using SAP PI 7.0 By Deepak Shah, L&T Infotech Brief Overview: The purpose of this exercise is to call an RFC from SAP R/3 asynchronously. A

More information

Dynamic Selection Screen Generation for SAP Solutions

Dynamic Selection Screen Generation for SAP Solutions 52 Informatica Economică vol. 21, no. 3/2017 Dynamic Selection Screen Generation for SAP Solutions Cornelia MUNTEAN Faculty of Economics and Business Administration, West University of Timisoara, Romania

More information

Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI

Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI Applies to: SAP BW (3.5) / SAP BI(7.0) For more information, visit Business Intelligence Homepage. Summary This article

More information

Selection-Screen Design

Selection-Screen Design Applies To: SAP R/3, ABAP/4 Summary This program illustrates some of the selection-screen design features, simple use of field symbols and the various events associated with a report program. And one good

More information

In this Chapter you will learn...

In this Chapter you will learn... Objectives In this Chapter you will learn... Programming Language Basic Syntax of ABAP The ABAP/4 Programming Language A B A P / 4 dvanced usiness pplication rogramming SAP AG ABAP 4 is a programming language

More information

SAP Debug Tips Switching between the Classic Debugger and New Debugger

SAP Debug Tips Switching between the Classic Debugger and New Debugger SAP Debug Tips The ABAP Debugger is used tool to execute and analyze programs line by line. Using it we can check the flow logic of a program and display runtime values of the variables. Currently, SAP

More information

SDN Community Contribution

SDN Community Contribution SDN Community Contribution (This is not an official SAP document.) Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces

More information

The software shall provide the necessary tools to allow a user to create a Dashboard based on the queries created.

The software shall provide the necessary tools to allow a user to create a Dashboard based on the queries created. IWS BI Dashboard Template User Guide Introduction This document describes the features of the Dashboard Template application, and contains a manual the user can follow to use the application, connecting

More information

Rows and Range, Preceding and Following

Rows and Range, Preceding and Following Rows and Range, Preceding and Following SQL Server 2012 adds many new features to Transact SQL (T-SQL). One of my favorites is the Rows/Range enhancements to the over clause. These enhancements are often

More information

SAP ABAP. Introduction to SAP ABAP

SAP ABAP. Introduction to SAP ABAP SAPABAP TRAINING SAP ABAP Introduction to SAP ABAP What is SAP? History and Technical Features of SAP SAP R/3 Architecture What is ABAP? ABAPers Role? What is Transaction code? ABAP Workbench Objects SAP

More information

CSC Web Programming. Introduction to SQL

CSC Web Programming. Introduction to SQL CSC 242 - Web Programming Introduction to SQL SQL Statements Data Definition Language CREATE ALTER DROP Data Manipulation Language INSERT UPDATE DELETE Data Query Language SELECT SQL statements end with

More information

SAP EDUCATION SAMPLE QUESTIONS: C_TAW12_750. Questions. 1. You need to perform a downcast. What should you do?

SAP EDUCATION SAMPLE QUESTIONS: C_TAW12_750. Questions. 1. You need to perform a downcast. What should you do? SAP EDUCATION SAMPLE QUESTIONS: C_TAW12_750 SAP Certified Development Associate - ABAP with SAP NetWeaver 7.50 Disclaimer: These sample questions are for self-evaluation purposes only and do not appear

More information

ABAP Program to Read/Populate Selection Screen Parameters Dynamically

ABAP Program to Read/Populate Selection Screen Parameters Dynamically ABAP Program to Read/Populate Selection Screen Parameters Dynamically Applies to: SAP 4.6c Summary The main purpose of this article is to focus on dynamic read and dynamic population of selection screen

More information

Batch History: How to Guide on getting Batch information from non SAP systems using SAP MII

Batch History: How to Guide on getting Batch information from non SAP systems using SAP MII Batch History: How to Guide on getting Batch information from non SAP systems using SAP MII Applies to: Batch History functionality (EhP4 release) Summary Today s manufacturing scenario, customers store

More information

Microsoft Certified Application Specialist Exam Objectives Map

Microsoft Certified Application Specialist Exam Objectives Map Microsoft Certified Application Specialist Exam Objectives Map This document lists all Microsoft Certified Application Specialist exam objectives for (Exam 77-605) and provides references to corresponding

More information

1.8.1 Research various database careers SE: 335

1.8.1 Research various database careers SE: 335 AR Advanced Database Framework (492140) Correlated to Benchmark Series: Microsoft Access 2010 Part 1 Unit 1: Introduction to Relational Databases and Database Careers 1.1 Define terminology 1.1.1 Prepare

More information

SE: 4, 6, 31 (Knowledge Check), 60, (Knowledge Check) 1.2 Explain the purpose of a relational Explain how a database is

SE: 4, 6, 31 (Knowledge Check), 60, (Knowledge Check) 1.2 Explain the purpose of a relational Explain how a database is AR Advanced Database Framework (492140) Correlated to Marquee Series: Microsoft Access 2010 Unit 1: Introduction to Relational Databases and Database Careers 1.1 Define terminology 1.1.1 Prepare a list

More information

Application Monitoring Setup and User Guideline. BPMon Data Collectors for non-abap/non-sap: Application Monitoring. Version: 2.0

Application Monitoring Setup and User Guideline. BPMon Data Collectors for non-abap/non-sap: Application Monitoring. Version: 2.0 Application Monitoring Setup and User Guideline BPMon Data Collectors for non-abap/non-sap: Application Monitoring Version: 2.0 Last Change: 20.09.2017 Table of Contents 1 Introduction...5 2 The monitoring

More information

Lecture 8. Database Management and Queries

Lecture 8. Database Management and Queries Lecture 8 Database Management and Queries Lecture 8: Outline I. Database Components II. Database Structures A. Conceptual, Logical, and Physical Components III. Non-Relational Databases A. Flat File B.

More information

Cross Database Comparison Enhancement Guide. Document Version 1.0 ( )

Cross Database Comparison Enhancement Guide. Document Version 1.0 ( ) Cross Database Comparison Enhancement Guide Document Version 1.0 (2014-07-15) www.sap.com TABLE OF CONTENT MOTIVATION... 3 Characteristics of generated CDC Data Extractors... 3 Limitation of generated

More information

Application Monitoring Setup and User Guideline. BPMon Data Collectors. Application Monitoring. Version: 2.0

Application Monitoring Setup and User Guideline. BPMon Data Collectors. Application Monitoring. Version: 2.0 Application Monitoring Setup and User Guideline BPMon Data Collectors for non-abap/non-sap: Application Monitoring Version: 2.0 Last Change: 20.09.2017 Table of Contents 1 Introduction... 5 2 The monitoring

More information

REPORT ytestjro. DATA: * Déclaration des tables internes : lt_sflight TYPE STANDARD TABLE OF sflight, lt_fldcat TYPE lvc_t_fcat. START-OF-SELECTION.

REPORT ytestjro. DATA: * Déclaration des tables internes : lt_sflight TYPE STANDARD TABLE OF sflight, lt_fldcat TYPE lvc_t_fcat. START-OF-SELECTION. REPORT ytestjro. DATA: * Déclaration des tables internes : lt_sflight TYPE STANDARD TABLE OF sflight, lt_fldcat TYPE lvc_t_fcat. START-OF-SELECTION. * Récupération des vols : SELECT * INTO TABLE lt_sflight

More information

PI Monitoring Functionality Fetching Data from SXMB_MONI Standard Tables

PI Monitoring Functionality Fetching Data from SXMB_MONI Standard Tables PI Monitoring Functionality Fetching Data from SXMB_MONI Standard Tables Applies to: SAP Exchange Infrastructure (SAP NetWeaver Process Integration 7.0). For more information, visit the ABAP homepage.

More information

Chapter 08 ABAP/4 Open SQL

Chapter 08 ABAP/4 Open SQL Chapter 08 ABAP/4 Open SQL ABAP/4 Open SQL Chapter 08 Objectives How to read, change, delete and insert data in database tables with the ABAP/4 Open SQL key words SELECT, MODIFY, UPDATE, DELETE and INSERT

More information

Preface. Question 1. Assignment 4 Stephan Brumme June 27 th, th semester,

Preface. Question 1. Assignment 4 Stephan Brumme June 27 th, th semester, Preface This assignment suffers from a bad timing, at least they do not fit my schedule. My first exams (not the oral exam for ERP systems!) begin just next week so I better prepare for them and skip questions

More information

This post contains all database table operations- like select, insert, update, modify, collect, inner-join, left-outer-join, for all entries...

This post contains all database table operations- like select, insert, update, modify, collect, inner-join, left-outer-join, for all entries... This post contains all database table operations- like select, insert, update, modify, collect, inner-join, left-outer-join, for all entries... ******DB TABLE OPERATION- SELECT - ENDSELECT ****** TYPES

More information

Using Parameters in SAP ABAP

Using Parameters in SAP ABAP Selection Screen Design using SAP ABAP Using Parameters in SAP ABAP How to add an input field in Selection Screen using SAP ABAP? Using Parameters in SAP ABAP Programming PARAMETERS statement is used to

More information

Relational Database Management Systems for Epidemiologists: SQL Part II

Relational Database Management Systems for Epidemiologists: SQL Part II Relational Database Management Systems for Epidemiologists: SQL Part II Outline Summarizing and Grouping Data Retrieving Data from Multiple Tables using JOINS Summary of Aggregate Functions Function MIN

More information

SAP ABAP ONLINE TRAINING COURSE

SAP ABAP ONLINE TRAINING COURSE SAP ABAP ONLINE TRAINING COURSE CONTENT What is SAP ABAP? ABAP is one of the many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language

More information

How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions)

How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions) SDN Contribution How to Copy Test Data Set from One Function Module to Another (Comes Handy While Renaming Functions) Applies to: SAP R/3 Release 4.6 onwards (might work for earlier versions as well, but

More information

Page 2 SAP Validation Configuration

Page 2 SAP Validation Configuration 2014 sapficoconsultant.com. All rights reserved. No part of this material should be reproduced or transmitted in any form, or by any means, electronic or mechanical including photocopying, recording or

More information

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables Instructor: Craig Duckett Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM

More information

Part2 Enhancement and Screen-Exit ZPMNOT CMOD

Part2 Enhancement and Screen-Exit ZPMNOT CMOD As seen in the picture, we have created Two Customer-Fields namely ZZDELAY and ZZREASON. It is essential for all Customer fields used in Enhancement purposes to be prefixed with ZZ. Part2 Enhancement and

More information

I am known to the system as DEVELOP30. Therefore, I named my development class ZHPI30, etc.

I am known to the system as DEVELOP30. Therefore, I named my development class ZHPI30, etc. Preface I am known to the system as DEVELOP30. Therefore, I named my development class ZHPI30, etc. Question 1: General Account Survey (Open SQL) Copy program ZHPI00ReportOpenSQL which defines a report

More information

Database Management Systems,

Database Management Systems, Database Management Systems SQL Query Language (3) 1 Topics Aggregate Functions in Queries count sum max min avg Group by queries Set Operations in SQL Queries Views 2 Aggregate Functions Tables are collections

More information

Debugging for Fuco s. Explanation, tips & trics for debugging in SAP CRM

Debugging for Fuco s. Explanation, tips & trics for debugging in SAP CRM Debugging for Fuco s Explanation, tips & trics for debugging in SAP CRM Gert-Jan Stolmeijer, Business Consultant 01-01-2013 Table of Contents Introduction Debug screen Debugging Breakpoints and Watch points

More information

SAP- ABAP/4 ADVANCED COURSE CONTENT

SAP- ABAP/4 ADVANCED COURSE CONTENT SAP- ABAP/4 ADVANCED COURSE CONTENT SAP Basic Introduction SAP R/3 Overview SAP POC BRD Creation Blue-Print Roadmap Asap Methodology Project Management Overview ABAP Dictionary Concepts Tables, Data Elements

More information

Connecting Spotfire to Data Sources with Information Designer

Connecting Spotfire to Data Sources with Information Designer Connecting Spotfire to Data Sources with Information Designer Margot Goodwin, Senior Manager, Application Consulting September 15, 2016 HUMAN HEALTH ENVIRONMENTAL HEALTH 2014 PerkinElmer Spotfire Information

More information

Lesson 13 Transcript: User-Defined Functions

Lesson 13 Transcript: User-Defined Functions Lesson 13 Transcript: User-Defined Functions Slide 1: Cover Welcome to Lesson 13 of DB2 ON CAMPUS LECTURE SERIES. Today, we are going to talk about User-defined Functions. My name is Raul Chong, and I'm

More information

Search non-case sensitive

Search non-case sensitive How to Search non-case sensitive BUSINESS INFORMATION WAREHOUSE Applicable Releases: SAP BW 3.x June 2003 SAP (SAP America, Inc. and SAP AG) assumes no responsibility for errors or omissions in these materials.

More information

Analytics: Server Architect (Siebel 7.7)

Analytics: Server Architect (Siebel 7.7) Analytics: Server Architect (Siebel 7.7) Student Guide June 2005 Part # 10PO2-ASAS-07710 D44608GC10 Edition 1.0 D44917 Copyright 2005, 2006, Oracle. All rights reserved. Disclaimer This document contains

More information

Microsoft Access Illustrated. Unit B: Building and Using Queries

Microsoft Access Illustrated. Unit B: Building and Using Queries Microsoft Access 2010- Illustrated Unit B: Building and Using Queries Objectives Use the Query Wizard Work with data in a query Use Query Design View Sort and find data (continued) Microsoft Office 2010-Illustrated

More information

81067AE Development Environment Introduction in Microsoft

81067AE Development Environment Introduction in Microsoft Microsoft Course Modules for Microsoft Training Online: 1. Development Environment Lesson 1: Object Designer. Lesson 2: 7 Objects & The Logical Database. Lesson 3: Managing Objects. Lesson 4: Properties

More information

Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY

Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY Custom BADI Using Function Module UJQ_RUN_AXIS_QUERY Applies to: SAP Business Planning and Consolidation for NetWeaver 7.0. Summary This Guide covers how to use Custom BADI and the functionality of the

More information

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview

COURSE LISTING. Courses Listed. with ABAP Dialog Programming. 25 December 2017 (08:57 GMT) NW001 - SAP NetWeaver - Overview with ABAP Dialog Programming Courses Listed NW001 - SAP NetWeaver - Overview SAPTEC - SAP NetWeaver Application Server Fundamentals BC100 - ( ABAP) BC100E - Introduction to Programming with ABAP BC400

More information

My Query Builder Function

My Query Builder Function My Query Builder Function The My Query Builder function is used to build custom SQL queries for reporting information out of the TEAMS system. Query results can be exported to a comma-separated value file,

More information

Preface Introduction... 23

Preface Introduction... 23 Preface... 19 1 Introduction... 23 1.1 Releases Used... 23 1.2 New Features in Releases 7.02 and 7.2... 25 1.2.1 New Features in ABAP... 25 1.2.2 New Features in Tools... 28 1.3 Syntax Conventions in The

More information

Deep Dive: Pronto Transformations Reference

Deep Dive: Pronto Transformations Reference Deep Dive: Pronto Transformations Reference Available Transformations and Their Icons Transform Description Menu Icon Add Column on page 2 Important: Not available in Trial. Upgrade to Pro Edition! Add

More information

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI:

SAP' ABAP. Handbook. Kogent Learning Solutions, Inc. Sudbury, Massachusetts JONES AND BARTLETT PUBLISHERS BOSTON TORONTO LONDON SINUAPORI: SAP' ABAP Handbook Kogent Learning Solutions, Inc. JONES AND BARTLETT PUBLISHERS Sudbury, Massachusetts BOSTON TORONTO LONDON SINUAPORI: Table of Contents Introduction xxi About This Book How to Use This

More information

COURSE LISTING. Courses Listed. Training for Database & Technology with Development in ABAP Dialog Programming. Beginner. Intermediate.

COURSE LISTING. Courses Listed. Training for Database & Technology with Development in ABAP Dialog Programming. Beginner. Intermediate. Training for Database & Technology with Development in ABAP Dialog Programming Courses Listed Beginner NW001 - SAP NetWeaver - Overview Intermediate SAPTEC - Technology Fundamentals for SAP S/4HANA and

More information

Easy Application Integration: How to use the Records Management Call Handler Framework

Easy Application Integration: How to use the Records Management Call Handler Framework Easy Application Integration: How to use the Records Management Call Handler Framework Applies to: SAP NetWeaver > 7.0 For more information, visit the Data Management and Integration homepage. Summary

More information

Crystal Reports. Overview. Contents. Differences between the Database menu in Crystal Reports 8.5 and 9

Crystal Reports. Overview. Contents. Differences between the Database menu in Crystal Reports 8.5 and 9 Crystal Reports Differences between the Database menu in Crystal Reports 8.5 and 9 Overview Contents If you cannot find a command that exists in Crystal Reports 8.5 from the Database menu in Crystal Reports

More information

Subquery: There are basically three types of subqueries are:

Subquery: There are basically three types of subqueries are: Subquery: It is also known as Nested query. Sub queries are queries nested inside other queries, marked off with parentheses, and sometimes referred to as "inner" queries within "outer" queries. Subquery

More information

! Define terms. ! Interpret history and role of SQL. ! Write single table queries using SQL. ! Establish referential integrity using SQL

! Define terms. ! Interpret history and role of SQL. ! Write single table queries using SQL. ! Establish referential integrity using SQL OBJECTIVES CHAPTER 6: INTRODUCTION TO SQL Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi! Define terms! Interpret history and role of SQL! Define a database using SQL

More information

(ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK)

(ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK) (ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK) 4. OUTLINE 4. Implementation 4.1 Introduction to SQL 4.2 Advanced SQL 4.3 Database Application Development 4.4

More information

INTERMEDIATE SQL GOING BEYOND THE SELECT. Created by Brian Duffey

INTERMEDIATE SQL GOING BEYOND THE SELECT. Created by Brian Duffey INTERMEDIATE SQL GOING BEYOND THE SELECT Created by Brian Duffey WHO I AM Brian Duffey 3 years consultant at michaels, ross, and cole 9+ years SQL user What have I used SQL for? ROADMAP Introduction 1.

More information

Chapter 18 Outputting Data

Chapter 18 Outputting Data Chapter 18: Outputting Data 231 Chapter 18 Outputting Data The main purpose of most business applications is to collect data and produce information. The most common way of returning the information is

More information

Workbooks (File) and Worksheet Handling

Workbooks (File) and Worksheet Handling Workbooks (File) and Worksheet Handling Excel Limitation Excel shortcut use and benefits Excel setting and custom list creation Excel Template and File location system Advanced Paste Special Calculation

More information

Manual Trigger Sql Server 2008 Examples Insert Update Delete

Manual Trigger Sql Server 2008 Examples Insert Update Delete Manual Trigger Sql Server 2008 Examples Insert Update Delete Sync creates triggers AFTER INSERT, DELETE, UPDATE triggers for tables that You don't have to start a transaction manually. The trigger looks

More information

INTRODUCTION TO ABAP PROGRAMMING: SYNTAX FUNDAMENTALS

INTRODUCTION TO ABAP PROGRAMMING: SYNTAX FUNDAMENTALS INTRODUCTION TO ABAP PROGRAMMING: SYNTAX FUNDAMENTALS Spring 2011 Enterprise Programming From the textbook Chapter Two ABAP Workbench Object Navigator (SE80) Forward navigation Packages Transports Creating

More information

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems ORACLE TRAINING CURRICULUM Relational Database Fundamentals Overview of Relational Database Concepts Relational Databases and Relational Database Management Systems Normalization Oracle Introduction to

More information