Estimating Effort of a Scenerio
Does anyone any a way of estimating how long a scenario will take to develop? We are finishing up our Blueprint phase of our SAP implementation, and the XI scenarios need time estimates associated with them.
What methodology(s) have you used for estimating a scenario in XI? Any lessons learned would be helpful.
Thank you
Dear Whit ,
Effort estimations are done based on the configuration required scenario wise :
1)Requirement Gathering and Blueprint phase signoff of complete scenario : 15-20 days
2)Specs and Realization on Mapping document,approval for developmemt: 03-05 days
3)Design,Development and Initial development documentation for a given scenario : 5-10 days
4)Initial Testing for the given scenario : 2 days
5)Integration testing for the given scenario and changes if any:0203 days
6)Integration testing in Quality environment : 01-02 days
7) Final Production migration and signoff : 01-02 days
Note : The above mentioned effort estimation is the tentative time taken for a particular scenario and it may vary in the cases where we have the following constraints
1) Standard inbuilt adapters of XI are not used
2) Inbound / Outbound R/3 transactions are custom development
3) Prebuilt scripts to receive / send the files to a location is not made
4) Sizing and hardware feasibility is not done
Cheers
Prabhat
Similar Messages
-
Estimation efforts for interfaces
As I am XI beginner, I would like to know about these.
1. How can we estimate the efforts for the interfaces need to develop? Like..
- How many man-days will take to complete the interface in real time.
- On what criteria xi team will classify the interfaces.
2. How to do the testing of the interfaces? How to validate the data in XI, during any testing of interfaces?
3. How can we check the performance of the XI interfaces developed? What are the parameters to assess the performance?
Can some one please answer my doubts?
Thanks in adv..
ShriyaHey
>>What i would like to know from above ques is.. how we will test, what to test, what are the inputs need to test.. etc and then last.. how to validate the tested data is correct or not
First of all XI is a middleware not a testing tool so efforts must be taken to perform validations outside XI(e.g. in the system generating sender file).Now comin to ur questions
>>how we will test
When u get the functional specification/technical specification u get the test data and the expected output along with it,and u have to use that test data to test ur scenarios.by comparing theexpected output and the actual output u can make sure that ur scenario is giving the desired result.
>>what to test
first of all u should test whether ur scenario is giving the desired result or not ,after that u can look for performance under the performance monitoring in RWB,u may also check component monitoring under RWB.
>>what are the inputs need to test
you get the inputs along with the FS/TS(it depends a lot upon the sender interface,if its an IDOC u post IDOC from R/3 and test ur scenario,if its a File u place the file in sender directory and test etc.)
>>how to validate the tested data is correct or not
u compare the expected output to the actual output and see if ur scenario is doin wats expected outta it.
most of things in XI are interface specific so if u can specify what are ur interfaces ,we would be able to help u more
thanx
ahmad
Message was edited by:
Ahmad -
Does it need effort to upgrade SSRS from SQL Server 2005 to 2014?
Hi,
i have a customer who wants to upgrade the their system. for SQL Server part, the current version is 2005, they want to upgrade to 2014. is it possible that don't change any code for SSRS? if have to change, what's the estimated effort? the total RDL files
are more than 200.Hi dingsheng,
In this scenario, you don't need to change code for Reporting Services. Those reports can be still available. Please run SQL Server Upgrade Advisor on the report server computer to determine any issues that might prevent you from successfully upgrading.
For more information, please see:
Upgrade and Migrate Reporting Services
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Database Migration project Estimation
Hello,
Can someone help me with the techniques of estimating efforts for front end application changes required due to database migration (lets say from Sybase ASA to SQL Server/Oracle)?Hello,
The following resources may help you.
https://technet.microsoft.com/en-us/library/bb497050.aspx
http://www.mssqltips.com/sqlservertip/1936/sql-server-database-migration-checklist/
https://technet.microsoft.com/en-us/solutionaccelerators/dd537572
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Not getting the excpected result.
Hi all,
My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
My Program is:
* Created on Apr 13, 2005
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
package forums;
import java.io.*;
import java.awt.Color;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.Font.*;
import com.lowagie.text.pdf.MultiColumnText;
import com.lowagie.text.Phrase.*;
import net.sf.hibernate.mapping.Array;
import org.apache.poi.hssf.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hssf.usermodel.*;
import com.lowagie.text.Phrase.*;
import java.util.Iterator;
* Generates a simple 'Hello World' PDF file.
* @author blowagie
public class pdfgenerator {
* Generates a PDF file with the text 'Hello World'
* @param args no arguments needed here
public static void main(String[] args) {
System.out.println("Hello World");
Rectangle pageSize = new Rectangle(916, 1592);
pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
// step 1: creation of a document-object
//Document document = new Document(pageSize);
Document document = new Document(pageSize, 132, 164, 108, 108);
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
// step 3: we open the document
document.open();
Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
Iterator rows = hsheet.rowIterator();
while( rows.hasNext() ) {
Phrase phrase=new Phrase();
HSSFRow row = (HSSFRow) rows.next();
//System.out.println( "Row #" + row.getRowNum());
// Iterate over each cell in the row and print out the cell's content
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
HSSFCell cell = (HSSFCell) cells.next();
//System.out.println( "Cell #" + cell.getCellNum() );
switch ( cell.getCellType() ) {
case HSSFCell.CELL_TYPE_STRING:
String stringcell=cell.getStringCellValue ()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringcell);
// document.add(new Phrase(string));
System.out.print( cell.getStringCellValue () );
break;
case HSSFCell.CELL_TYPE_FORMULA:
String stringdate=cell.getCellFormula()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringdate);
System.out.print( cell.getCellFormula() );
break;
case HSSFCell.CELL_TYPE_NUMERIC:
String string=String.valueOf(cell.getNumericCellValue())+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(string);
System.out.print( cell.getNumericCellValue() );
break;
default:
//System.out.println( "unsuported sell type" );
break;
document.add(new Paragraph(phrase));
document.add(new Paragraph("\n \n \n"));
// step 4: we add a paragraph to the document
} catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
// step 5: we close the document
document.close();
My Input from MS-Excel file is:
Planning and Tracking Template for Interns
Name of the Intern N.Kesavulu Reddy
Project Name Enterprise Sales and Marketing
Description Estimated Effort in Hrs Planned/Replanned Actual Actual Effort in Hrs Complexity Priority LOC written new & modified % work completion Status Rework Remarks
S.No Start Date End Date Start Date End Date
1 setup the configuration 31/01/2005 1/2/2005 31/01/2005 1/2/2005
2 Deploying an application through Tapestry, Spring, Hibernate 2/2/2005 2/2/2005 2/2/2005 2/2/2005
3 Gone through Componentization and Cxprice application 3/2/2005 3/2/2005 3/2/2005 3/2/2005
4 Attend the sessions(tapestry,spring, hibernate), QBA 4/2/2005 4/2/2005 4/2/2005 4/2/2005
The o/p I'm gettint in .pdf file is:
Planning and Tracking Template for Interns
N.Kesavulu Reddy Name of the Intern
Enterprise Sales and Marketing Project Name
Remarks Rework Status % work completion LOC written new & modified Priority
Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
End Date Start Date End Date Start Date S.No
38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
2.0
38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
3.0
38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
The issues i'm facing are:
When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
and the second issue is:
It is not recognizing the date format..it is recognizing the date in first row only......
Plz Tell me wht is the solution for this...
Regards
[email protected]Use your debugger to step through the code line by line. This should help you understand what it's doing. Or if you don't want to do that, sprinkle output statements all over until you know what it's doing.
-
Writing a java program for generating .pdf file with the data of MS-Excel .
Hi all,
My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
My Program is:
* Created on Apr 13, 2005
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
package forums;
import java.io.*;
import java.awt.Color;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.Font.*;
import com.lowagie.text.pdf.MultiColumnText;
import com.lowagie.text.Phrase.*;
import net.sf.hibernate.mapping.Array;
import org.apache.poi.hssf.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hssf.usermodel.*;
import com.lowagie.text.Phrase.*;
import java.util.Iterator;
* Generates a simple 'Hello World' PDF file.
* @author blowagie
public class pdfgenerator {
* Generates a PDF file with the text 'Hello World'
* @param args no arguments needed here
public static void main(String[] args) {
System.out.println("Hello World");
Rectangle pageSize = new Rectangle(916, 1592);
pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
// step 1: creation of a document-object
//Document document = new Document(pageSize);
Document document = new Document(pageSize, 132, 164, 108, 108);
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
// step 3: we open the document
document.open();
Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
Iterator rows = hsheet.rowIterator();
while( rows.hasNext() ) {
Phrase phrase=new Phrase();
HSSFRow row = (HSSFRow) rows.next();
//System.out.println( "Row #" + row.getRowNum());
// Iterate over each cell in the row and print out the cell's content
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
HSSFCell cell = (HSSFCell) cells.next();
//System.out.println( "Cell #" + cell.getCellNum() );
switch ( cell.getCellType() ) {
case HSSFCell.CELL_TYPE_STRING:
String stringcell=cell.getStringCellValue ()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringcell);
// document.add(new Phrase(string));
System.out.print( cell.getStringCellValue () );
break;
case HSSFCell.CELL_TYPE_FORMULA:
String stringdate=cell.getCellFormula()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringdate);
System.out.print( cell.getCellFormula() );
break;
case HSSFCell.CELL_TYPE_NUMERIC:
String string=String.valueOf(cell.getNumericCellValue())+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(string);
System.out.print( cell.getNumericCellValue() );
break;
default:
//System.out.println( "unsuported sell type" );
break;
document.add(new Paragraph(phrase));
document.add(new Paragraph("\n \n \n"));
// step 4: we add a paragraph to the document
} catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
// step 5: we close the document
document.close();
My Input from MS-Excel file is:
Planning and Tracking Template for Interns
Name of the Intern N.Kesavulu Reddy
Project Name Enterprise Sales and Marketing
Description Estimated Effort in Hrs Planned/Replanned Actual Actual Effort in Hrs Complexity Priority LOC written new & modified % work completion Status Rework Remarks
S.No Start Date End Date Start Date End Date
1 setup the configuration 31/01/2005 1/2/2005 31/01/2005 1/2/2005
2 Deploying an application through Tapestry, Spring, Hibernate 2/2/2005 2/2/2005 2/2/2005 2/2/2005
3 Gone through Componentization and Cxprice application 3/2/2005 3/2/2005 3/2/2005 3/2/2005
4 Attend the sessions(tapestry,spring, hibernate), QBA 4/2/2005 4/2/2005 4/2/2005 4/2/2005
The o/p I'm gettint in .pdf file is:
Planning and Tracking Template for Interns
N.Kesavulu Reddy Name of the Intern
Enterprise Sales and Marketing Project Name
Remarks Rework Status % work completion LOC written new & modified Priority
Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
End Date Start Date End Date Start Date S.No
38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
2.0
38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
3.0
38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
The issues i'm facing are:
When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
and the second issue is:
It is not recognizing the date format..it is recognizing the date in first row only......
Plz Tell me wht is the solution for this...
Regards
[email protected]Don't double post your question:
http://forum.java.sun.com/thread.jspa?threadID=617605&messageID=3450899#3450899
/Kaj -
Interaction ESS - Webdynpro - Websphere portal
Hi all,
a question please if you can help me:
Could Websphere Portal interact with ESS through the URL address of its WebDynpro pages ?
do you know something about this argument ?
I know that in the old version, it was easy for a non-SAP portal to work together with ESS, through the so-called PMZ3 menu, which was addressable thorough its URL. Could we work this way with the most recent version of ESS using Web Dynpro interfaces, not using the correspondent iViews ?
Thanks a lot in advanceHi, there is possible, but i understand you've to be careful with all the required connections, SSO config, where database user is located, and of course, good servers' capabilities and have ever a good technical background support to face issues.
There are some links:
http://www.sap.com/platform/netweaver/websphere.epx
http://www.sap.com/canada/solutions/pdf/BWP_WebSphere.pdf
http://www.gwug.org/artikel/download/WebSphere_und_SAP-Integration.pdf (excellent article)
You can check in Portal Implementation or another technical forum for estimated effort in time, technical difficulties, etc. Also please contact with your SAP Agent to know the license implications.
Regards! -
Using the URL type field in a Dictionary
Using the URL type field in a Dictionary
How and when would I use the URL Field in a Dictionary? What is the advantage of using this field?
For example, you may have tasks within a service delivery in which performers must access a spreadsheet and enter their estimated efforts and costs in that spreadsheet. You might use this URL type field to direct the task performers to the site where the spreadsheet is residing.
To set up the URL field:
In the Dictionary, for the desired Field, select the "URL" type.
When the service performer enters information into the field (during the Service Dellivery moment), it will beautomatically concatenated with the RequestCenter system URL, and presented as a hyperlink immediately below the entry field in the service form.
The performer is directed to the URL, i.e.:
/RequestCenter/servicemanager/MemorySize
Advantages to this design approach:
1. Allows users who do not have access to RequestCenter to view the estimated efforts and costs.
2. Compensates for the fact that the service form itself cannot display the fields in a table format.Hey,
As per my understanding, you want to display link with text instead of whole url string. For that you can provide link text as a description in URL type field so the same will be displayed as a link title in list view while rendering.
Thanks. -
Value questions for SAP HR Reporting
I am working as a "SAP HR Functional consultant".
I am preparing Value Questions that can benefit End users with respect to SAP HR Reporting.
Could you kindly help me by sending some questions [If you have any ] & Also tell me how to prepare them?
<b>For Exp</b>: This below example is for sales, need the same for HR scenarios ( Time management,Org Management, Budget monitoring, Leave management)
<b>Q</b>
1. Actor - Sales Rep
2. Question - Are there new Leads/Opportunities that need my attention?
3.Action to take - follow-up with Oppty's contact & update Oppty Record with actions taken
<b>Q</b>
1. Actor - Sales Rep
2. Question - What are my territorys/geography's monthly Sales trends?
3.Action to take - contact customers whose sales are below expectations
Waiting for your early reply.
Thanks.
NimishaHi Nisha
We generally categorise the reports in a matrix structure based on the following criteria -
1. Usage of the report, eg. monthly, weekly and so on
2. Data to be processed per usage, eg. no of records
3. Criticality of the report, eg, must have, useful, important, nice to have and so on
4. Intended users of the report, eg, management, top management, support satff and so on
Based on the matrix and the estimated effort required for each report, we make a decision of which reports to be created and the ranking of the reports, that is, which reports to be created on an urgent basis and which ones can be taken up later.
Also, the same matrix can be used for determining the authorizations for the reports.
Pls feel free to contact me in case of any further queries/clarifications.
Regards
Lincoln -
Abap basics material documents
Hi Gurus,
i am intrested to learn basic in Abap i want to make my carrrier in it so i kindky request you to plz send material my [email protected]
Thanks in Advance,
Edited by: Krishna on Apr 23, 2008 2:16 PM
Edited by: Krishna on Apr 23, 2008 2:17 PMHi....
Go for Siemens material. Check the following link:
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
additional info
ABAP is one of many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting. ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the German meaning of "generic report preparation processor", but was later renamed to Advanced Business Application Programming. ABAP was one of the first languages to include the concept of Logical Databases (LDBs), which provides a high level of abstraction from the basic database level.
The ABAP programming language was originally used by SAP developers to develop the SAP R/3 platform. It was also intended to be used by SAP customers to enhance SAP applications customers can develop custom reports and interfaces with ABAP programming. The language is fairly easy to learn for programmers but it is not a tool for direct use by non-programmers. Good programming skills, including knowledge of relational database design and preferably also of object-oriented concepts, are required to create ABAP programs.
ABAP remains the language for creating programs for the client-server R/3 system, which SAP first released in 1992. As computer hardware evolved through the 1990s, more and more of SAP's applications and systems were written in ABAP. By 2001, all but the most basic functions were written in ABAP. In 1999, SAP released an object-oriented extension to ABAP called ABAP Objects, along with R/3 release 4.6.
SAP's most recent development platform, NetWeaver, supports both ABAP and Java.
edit Implementation
edit Where does the ABAP Program Run?
All ABAP programs reside inside the SAP database. They are not stored in separate external files like Java or C++ programs. In the database all ABAP code exists in two forms: source code, which can be viewed and edited with the ABAP workbench, and "compiled" code ("generated" code is the more correct technical term), which is loaded and interpreted by the ABAP runtime system. Code generation happens implicitly when a unit of ABAP code is first invoked. If the source code is changed later or if one of the data objects accessed by the program has changed (e.g. fields were added to a database table), then the code is automatically regenerated.
ABAP programs run in the SAP application server, under control of the runtime system, which is part of the SAP kernel. The runtime system is responsible for processing ABAP statements, controlling the flow logic of screens and responding to events (such as a user clicking on a screen button). A key component of the ABAP runtime system is the Database Interface, which turns database-independent ABAP statements ("Open SQL") into statements understood by the underlying DBMS ("Native SQL"). The database interface handles all the communication with the relational database on behalf of ABAP programs; it also contains extra features such as buffering of frequently accessed data in the local memory of the application server.
Basis
Basis sits between ABAP/4 and Operating system.Basis is like an operating system for R/3. It sits between the ABAP/4 code and the computer's operating system. SAP likes to call it middleware because it sits in the middle, between ABAP/4 and the operating system. Basis sits between ABAP/4 and the operating system. ABAP/4 cannot run directly on an operating system. It requires a set of programs (collectively called Basis) to load, interpret, and buffer its input and output. Basis, in some respects, is like the Windows environment. Windows starts up, and while running it provides an environment in which Windows programs can run. Without Windows, programs written for the Windows environment cannot run. Basis is to ABAP/4 programs as Windows is to Windows programs. Basis provides the runtime environment for ABAP/4 programs. Without Basis, ABAP/4 programs cannot run. When the operator starts up R/3, you can think of him as starting up Basis. Basis is a collection of R/3 system programs that present you with an interface. Using this interface the user can start ABAP/4 programs. To install Basis, an installer runs the program r3inst at the command-prompt level of the operating system. Like most installs, this creates a directory structure and copies a set of executables into it. These executables taken together as a unit form Basis.
To start up the R/3 system, the operator enters the startsap command. The Basis executables start up and stay running, accepting requests from the user to run ABAP/4 programs.
ABAP/4 programs run within the protective Basis environment; they are not executables that run on the operating system. Instead, Basis reads ABAP/4 code and interprets it into operating system instructions. ABAP/4 programs do not access operating system functions directly. Instead, they use Basis functions to perform file I/O and display data in windows. This level of isolation from the operating system enables ABAP/4 programs to be ported without modification to any system that supports R/3. This buffering is built right into the ABAP/4 language itself and is actually totally transparent to the programmer.
Basis makes ABAP/4 programs portable. The platforms that R/3 can run on are shown in Table. For example, if you write an ABAP/4 program on Digital UNIX with an Informix database and an OSF/Motif interface, that same program should run without modification on a Windows NT machine with an Oracle database and a Windows 95 interface. Or, it could run on an AS/400 with a DB2 database using OS/2 as the front-end.
SAP also provides a suite of tools for administering the Basis system. These tools perform tasks such as system performance monitoring, configuration, and system maintenance. To access the Basis administration tools from the main menu, choose the path Tools->Administration.
Platforms and Databases Supported by R/3
Operating Systems Supported Hardware Supported Front-Ends Supported Databases
AIX SINIX IBM SNI SUN Win 3.1/95/NT DB2 for AIX
SOLARIS HP-UX Digital HP OSF/Motif Informix-Online
Digital-UNIX Bull OS/2 Oracle 7.1
Windows NT AT&T Compaq Win 3.1/95/NT Oracle 7.1
Bull/Zenith OSF/Motif SQL Server 6.0
HP (Intel) SNI OS/2 ADABAS D
OS/400 AS/400 Win95 OS/2 DB2/400
edit SAP Systems and Landscapes
All SAP data exists and all SAP software runs in the context of an SAP system. A system consists of a central relational database and one or more application servers ("instances") accessing the data and programs in this database. A SAP system contains at least one instance but may contain more, mostly for reasons of sizing and performance. In a system with multiple instances, load balancing mechanisms ensure that the load is spread evenly over the available application servers.
Installations of the Web Application Server (landscapes) typically consist of three systems: one for development, one for testing and quality assurance, and one for production. The landscape may contain more systems, e.g. separate systems for unit testing and pre-production testing, or it may contain fewer, e.g. only development and production, without separate QA; nevertheless three is the most common configuration. ABAP programs are created and undergo first testing in the development system. Afterwards they are distributed to the other systems in the landscape. These actions take place under control of the Change and Transport System (CTS), which is responsible for concurrency control (e.g. preventing two developers from changing the same code at the same time), version management and deployment of programs on the QA and production systems.
The Web Application Server consists of three layers: the database layer, the application layer and the presentation layer. These layers may run on the same or on different physical machines. The database layer contains the relational database and the database software. The application layer contains the instance or instances of the system. All application processes, including the business transactions and the ABAP development, run on the application layer. The presentation layer handles the interaction with users of the system. Online access to ABAP application servers can go via a proprietary graphical interface, the SAPGUI, or via a Web browser.
edit Transactions
We call an execution of an ABAP program using a transaction code a transaction. There are dialog, report, parameter, variant, and as of release 6.10, OO transactions. A transaction is started by entering the transaction code in the input field on the standard toolbar, or by means of the ABAP statements CALL TRANSACTION or LEAVE TO TRANSACTION. Transaction codes can also be linked to screen elements or menu entries. Selecting such an element will start the transaction.
A transaction code is simply a twenty-character name connected with a Dynpro, another transaction code, or, as of release 6.10, a method of an ABAP program. Transaction codes linked with Dynpros are possible for executable programs, module pools, and function groups. Parameter transactions and variant transactions are linked with other transaction codes. Transaction codes that are linked with methods are allowed for all program types that can contain methods. Transaction codes are maintained in transaction SE93.
So, a transaction is nothing more than the SAP way of program executionbut why is it called transaction? ABAP is a language for business applications and the most important features of business applications were and still are are transactions. Since in the early days of SAP, the execution of a program often meant the same thing as carrying out a business transaction, the terms transaction and transaction code were chosen for program execution. But never mix up the technical meaning of a transaction with business transactions. For business transactions, it is the term LUW (Logical Unit of Work) that counts. And during one transaction (program execution), there can be many different LUWs.
Lets have a look at the different kind of transactions:
edit Dialog Transaction
These are the most common kind of transactions. The transaction code of a dialog transaction is linked to a Dynpro of an ABAP program. When the transaction is called, the respective program is loaded and the Dynpro is called. Therefore, a dialog transaction calls a Dynpro sequence rather than a program. Only during the execution of the Dynpro flow logic are the dialog modules of the ABAP program itself are called. The program flow can differ from execution to execution. You can even assign different dialog transaction codes to one program.
edit Parameter Transaction
In the definition of a parameter transaction code, a dialog transaction is linked with parameters. When you call a parameter transaction, the input fields of the initial Dynpro screen of the dialog transaction are filled with parameters. The display of the initial screen can be inhibited by specifying all mandatory input fields as parameters of the transaction.
edit Variant Transaction
In the definition of a variant transaction code, a dialog transaction is linked with a transaction variant. When a variant transaction is accessed, the dialog transaction is called and executed with the transaction variant. In transaction variants, you can assign default values to the input fields on several Dynpro screens in a transaction, change the attributes of screen elements, and hide entire screens. Transaction variants are maintained in transaction SHD0.
edit Report Transaction
A report transaction is the transaction code wrapping for starting the reporting process. The transaction code of a report transaction must be linked with the selection screen of an executable program. When you execute a report transaction, the runtime environment internally executes the ABAP statement SUBMITmore to come on that.
edit OO Transaction
A new kind of transaction as of release 6.10. The transaction code of an OO transaction is linked with a method of a local or global class. When the transaction is called, the corresponding program is loaded, for instance methods an object of the class is generated and the method is executed.
edit Types of ABAP programs
In ABAP, there are two different types of programs:
edit Report programs(Executable pools)
A Sample ReportReport programs AKA Executable pools follow a relatively simple programming model whereby a user optionally enters a set of parameters (e.g. a selection over a subset of data) and the program then uses the input parameters to produce a report in the form of an interactive list. The output from the report program is interactive because it is not a passive display; instead it enables the user, through ABAP language constructs, to obtain a more detailed view on specific data records via drill-down functions, or to invoke further processing through menu commands, for instance to sort the data in a different way or to filter the data according to selection criteria. This method of presenting reports has great advantages for users who must deal with large quantities of information and must also have the ability to examine this information in highly flexible ways, without being constrained by the rigid formatting or unmanageable size of "listing-like" reports. The ease with which such interactive reports can be developed is one of the most striking features of the ABAP language.
The term "report" is somewhat misleading in the sense that it is also possible to create report programs that modify the data in the underlying database instead of simply reading it.
A customized screen created using Screen Painter,which is one of the tool available in ABAP workbench(T-code = SE51).
edit Online programs
Online programs (also called module pools) do not produce lists. These programs define more complex patterns of user interaction using a collection of screens. The term screen refers to the actual, physical image that the users sees. Each screen also has a flow logic; this refers to the ABAP code invoked by the screens, i.e. the logic that initializes screens, responds to a users requests and controls the sequence between the screens of a module pool. Each screen has its own Flow Logic, which is divided into a "PBO" (Process Before Output) and "PAI" (Process After Input) section. In SAP documentation the term dynpro (dynamic program) refers to the combination of the screen and its Flow Logic.
Online programs are not invoked directly by their name, but are associated with a transaction code. Users can then invoke them through customizable, role-dependent, transaction menus.
Apart from reports and online programs, it is also possible to develop sharable code units such as class libraries, function libraries and subroutine pools.
edit Subroutine Pools
Subroutine pools, as the name implies, were created to contain selections of subroutines that can be called externally from other programs. Before release 6.10, this was the only way subroutine pools could be used. But besides subroutines, subroutine pools can also contain local classes and interfaces. As of release 6.10, you can connect transaction codes to methods. Therefore, you can now also call subroutine pools via transaction codes. This is the closest to a Java program you can get in ABAP: a subroutine pool with a class containing a method say main connected to a transaction code!
edit Type Pools
Type pools are the precursors to general type definitions in the ABAP Dictionary. Before release 4.0, only elementary data types and flat structures could be defined in the ABAP Dictionary. All other types that shouldve been generally available had to be defined with TYPES in type pools. As of release 4.0, type pools were only necessary for constants. As of release 6.40, constants can be declared in the public sections of global classes and type pools can be replaced by global classes.
edit Class Pools
Class pools serve as containers for exactly one global class. Besides the global class, they can contain global types and local classes/interfaces to be used in the global class. A class pool is loaded into memory by using one of its components. For example, a public method can be called from any ABAP program or via a transaction code connected to the method. You maintain class pools in the class builder.
edit Interface Pools
Interface pools serve as containers for exactly one global interfacenothing more and nothing less. You use an interface pool by implementing its interface in classes and by creating reference variables with the type of its interface. You maintain interface pools in the class builder.
edit ABAP Workbench
The ABAP Workbench contains different tools for editing Repository objects. These tools provide you with a wide range of assistance that covers the entire software development cycle. The most important tools for creating and editing Repository objects are:
ABAP Editor for writing and editing program code
ABAP Dictionary for processing database table definitions and retrieving global types
Menu Painter for designing the user interface (menu bar, standard toolbar, application toolbar, function key assignment)
Screen Painter for designing screens (dynamic programs) for user dialogs
Function Builder for displaying and processing function modules (routines with defined interfaces that are available throughout the system)
Class Builder for displaying and processing ABAP Objects classes
edit The ABAP Dictionary
Enforces data integrity
Manages data definitions without redundancy
Is tightly integrated with the rest of the ABAP/4 Development Workbench.
Enforcing data integrity is the process of ensuring that data entered into the system is logical, complete, and consistent. When data integrity rules are defined in the ABAP/4 Dictionary, the system automatically prevents the entry of invalid data. Defining the data integrity rules at the dictionary level means they only have to be defined once, rather than in each program that accesses that data.
The following are examples of data lacking integrity:
A date field with a month value of 13
An order assigned to a customer number that doesnt exist
An order not assigned to a customer
Managing data definitions without redundancy is the process of linking similar information to the same data definition. For example, a customer database is likely to contain a customers ID number in several places. The ABAP Dictionary provides the capability of defining the characteristics of a customer ID number in only one place. That central definition then can be used for each instance of a customer ID number.
The ABAP Dictionarys integration with the rest of the development environment enables ABAP programs to automatically recognize the names and characteristics of dictionary objects.
Additionally, the system provides easy navigation between development objects and dictionary definitions. For example, as a programmer, you can double-click on the name of a dictionary object in your program code, and the system will take you directly to the definition of that object in the ABAP/4 Dictionary.
When a dictionary object is changed, a program that references the changed object will automatically reference the new version the next time the program runs. Because ABAP is interpreted, it is not necessary to recompile programs that reference changed dictionary objects.
edit ABAP Syntax
The syntax of the ABAP programming language consists of the following elements:
Statements
An ABAP program consists of individual ABAP statements. Each statement begins with a keyword and ends with a period.
edit "Hello World" PROGRAM
WRITE 'Hello World'.
This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".
The keyword determines the category of the statement. For an overview of the different categories, refer to ABAP Statements.
edit Formatting ABAP Statements
ABAP has no format restrictions. You can enter statements in any format, so a statement can be indented, you can write several statements on one line, or spread a single statement over several lines.
You must separate words within a statement with at least one space. The system also interprets the end of line marker as a space.
The program fragment
PROGRAM TEST.
WRITE 'This is a statement'.
could also be written as follows:
PROGRAM TEST. WRITE 'This is a statement'.
or as follows:
PROGRAM
TEST.
WRITE
'This is a statement'.
Use this free formatting to make your programs easier to understand.
edit Special Case: Text Literals
Text literals are sequences of alphanumeric characters in the program code that are enclosed in quotation marks. If a text literal in an ABAP statement extends across more than one line, the following difficulties can occur:
All spaces between the quotation marks are interpreted as belonging to the text literal. Letters in text literals in a line that is not concluded with quotation marks are interpreted by the editor as uppercase. If you want to enter text literals that do not fit into a single line, you can use the & character to combine a succession of text literals into a single one.
The program fragment
PROGRAM TEST.
WRITE 'This
is
a statement'.
inserts all spaces between the quotation marks into the literal, and converts the letters to uppercase.
This program fragment
PROGRAM TEST.
WRITE 'This' &
' is ' &
'a statement'.
combines three text literals into one.
edit Chained Statements
The ABAP programming language allows you to concatenate consecutive statements with an identical first part into a chain statement.
To concatenate a sequence of separate statements, write the identical part only once and place a colon ( after it. After the colon, write the remaining parts of the individual statements, separating them with commas. Ensure that you place a period (.) after the last part to inform the system where the chain ends.
Statement sequence:
WRITE SPFLI-CITYFROM.
WRITE SPFLI-CITYTO.
WRITE SPFLI-AIRPTO.
Chain statement:
WRITE: SPFLI-CITYFROM, SPFLI-CITYTO, SPFLI-AIRPTO.
In the chain, a colon separates the beginning of the statement from the variable parts. After the colon or commas, you can insert any number of spaces.
You could, for example, write the same statement like this:
WRITE: SPFLI-CITYFROM,
SPFLI-CITYTO,
SPFLI-AIRPTO.
In a chain statement, the first part (before the colon) is not limited to the keyword of the statements.
Statement sequence:
SUM = SUM + 1.
SUM = SUM + 2.
SUM = SUM + 3.
SUM = SUM + 4.
Chain statement:
SUM = SUM + : 1, 2, 3, 4.
edit Comments
Comments are texts that you can write between the statements of your ABAP program to explain their purpose to a reader. Comments are distinguished by the preceding signs * (at the beginning of a line) and " (at any position in a line). If you want the entire line to be a comment, enter an asterisk (*) at the beginning of the line. The system then ignores the entire line when it generates the program. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. The system interprets comments indicated by double quotation marks as spaces.
PROGRAM SAPMTEST *
WRITTEN BY KARL BYTE, 06/27/1995 *
LAST CHANGED BY RITA DIGIT, 10/01/1995 *
TASK: DEMONSTRATION *
PROGRAM SAPMTEST.
DECLARATIONS *
DATA: FLAG " GLOBAL FLAG
NUMBER TYPE I " COUNTER
PROCESSING BLOCKS *
Advantages of ABAP over Contemporary languages
ABAP OBJECTS
Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
edit ABAP Statements an Overview
The first element of an ABAP statement is the ABAP keyword. This determines the category of the statement. The different statement categories are as follows:
edit Declarative Statements
These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.
Examples of declarative keywords:
TYPES, DATA, TABLES
edit Modularization Statements
These statements define the processing blocks in an ABAP program.
The modularization keywords can be further divided into:
· Defining keywords
You use statements containing these keywords to define subroutines, function modules, dialog modules and methods. You conclude these processing blocks using the END statements.
Examples of definitive keywords:
METHOD ... ENDMETHOD, FUNCTION ... ENDFUNCTION, MODULE ... ENDMODULE.
· Event keywords
You use statements containing these keywords to define event blocks. There are no special statements to conclude processing blocks - they end when the next processing block is introduced.
Examples of event key words:
AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMAND
edit Control Statements
You use these statements to control the flow of an ABAP program within a processing block according to certain conditions.
Examples of control keywords:
IF, WHILE, CASE
edit Call Statements
You use these statements to call processing blocks that you have already defined using modularization statements. The blocks you call can either be in the same ABAP program or in a different program.
Examples of call keywords:
CALL METHOD, CALL TRANSACTION, SUBMIT, LEAVE TO
Operational Statements These keywords process the data that you have defined using declarative statements.
Examples of operational keywords:
MOVE, ADD
edit Unique Concept of Internal Table in ABAP
Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
edit Internal Tables as Data Types
Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
edit Line type
The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
edit Key
The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
edit Table type
The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
edit Generic Internal Tables
Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
edit Internal Tables as Dynamic Data Objects
Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
edit Choosing a Table Type
The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
edit Standard tables
This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
edit Sorted tables
This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
edit Hashed tables
This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
edit Advanced Topics
edit Batch Input: Concepts
Processing Sessions
The above figure shows how a batch input session works.A batch input session is a set of one or more calls to transactions along with the data to be processed by the transactions. The system normally executes the transactions in a session non-interactively, allowing rapid entry of bulk data into an R/3 System.
A session records transactions and data in a special format that can be interpreted by the R/3 System. When the System reads a session, it uses the data in the session to simulate on-line entry of transactions and data. The System can call transactions and enter data using most of the facilities that are available to interactive users.
For example, the data that a session enters into transaction screens is subject to the same consistency checking as in normal interactive operation. Further, batch input sessions are subject to the user-based authorization checking that is performed by the system.
edit Advantages of ABAP over Contemporary languages
ABAP Objects offers a number of advantages, even if you want to continue using procedural programming. If you want to use new ABAP features, you have to use object-oriented interfaces anyway.
Sharing Data: With ABAP shared objects, you can aggregate data once at a central location and the different users and programs can then access this data without the need for copying.
Exception Handling: With the class-based exception concept of ABAP, you can define a special control flow for a specific error situation and provide the user with information about the error.
Developing Persistency: For permanent storage of data in ABAP, you use relational database tables by means of database-independent Open SQL, which is integrated in ABAP. However, you can also store selected objects transparently or access the integrated database or other databases using proprietary SQL.
Connectivity and Interoperability: The Exchange Infrastructure and Web services are the means by which developers can implement a service-oriented architecture. With Web services, you can provide and consume services independently of implementation or protocol. Furthermore, you can do so within NetWeaver and in the communication with other systems. With the features of the Exchange Infrastructure, you can enable, manage, and adapt integration scenarios between systems.
Making Enhancements: With the Enhancement Framework, you can enhance programs, function modules, and global classes without modification as well as replace existing code. The Switch Framework enables you activate only specific development objects or enhancements in a system.
edit Considerable Aspects
It follows a list of aspects to be considered during development. The list of course is not complete.
edit Dynpro persistence
When implementing dynpros one has to care for himself to read out and persist the necessary fields. Recently it happened to me that I forgot to include a field into the UPDATE-clause which is an error not so easy to uncover if you have other problems to be solved in the same package. Here, tool-support or built-in mechanisms would help.
The developer could help himself out by creating something like a document containing a cookbook or guide in which parts of a dynpro logic one has to care about persistence. With that at hand, it would be quite easy finding those bugs in short time. Maybe a report scanning for the definition of the dynpro fields to be persisted could scan the code automatically, too.
edit Memory Cache
It should be common-sense that avoiding select-statements onto the database helps reducing the server load. For that the programmer either can resort to function modules if available. This maybe is the case for important tables. Or the programmer needs to implement his own logic using internal tables. Here, the standard software package could provide the developer with a tool or a mechanism auto-generating memory cached tables resp. function modules implementing this.
Sometimes buffering of database tables could be used, if applicable. But that would require an effort in customizing the system and could drain down system performance overall, especially if a table is involved that has a central role.
edit Interfaces
It should be noticed that some function modules available have an incomplete interface. That means, the interface does not include all parameters evaluated by the logic of the function module. For example, global variables from within the function group could be read out, which cannot be influenced by the general caller. Or memory parameters are used internally to feed the logic with further information.
One workaround here would be copying the relevant parts of the logic to a newly created function module and then adapt it to the own context. This sometimes is possible, maybe if the copied code is not too lengthy and only a few or no calls to other logic is part of it.
A modification of the SAP code could be considered, if the modification itself is unavoidable (or another solution would be not justifiable by estimated effort to spend on it) and if the location of the modification seems quite safe against future upgrades or hot fixes. The latter is something that could be evaluated by contacting the SAP hotline or working with OSS message (searching thru existing one, perhaps open a new one).
edit Example
'From SAP NetWeaver:'
set an exclusive lock at level object-type & object-id
IF NOT lf_bapi_error = true.
IF ( NOT istourhd-doc_type IS INITIAL ) AND
( NOT istourhd-doc_id IS INITIAL )
CALL FUNCTION 'ENQUEUE_/DSD/E_HH_RAREF'
EXPORTING
obj_typ = istourhd-doc_type
obj_id = istourhd-doc_id
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc 0.
terminate processing...
lf_bapi_error = true.
...and add message to return table
PERFORM set_msg_to_bapiret2
USING sy-msgid gc_abort sy-msgno
sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
gc_istourhd gc_enqueue_refdoc space
CHANGING lt_return.
ENDIF.
ENDIF.
ENDIF. " bapi error
edit Example Report(Type - ALV(Advanced List Viewer))
REPORT Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB .
*Simple example to use ALV and to define the ALV data in an internal
*table
*data definition
tables:
marav. "Table MARA and table MAKT
Data to be displayed in ALV
Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
matically determine the fieldstructure from this source program
Data:
begin of imat occurs 100,
matnr like marav-matnr, "Material number
maktx like marav-maktx, "Material short text
matkl like marav-matkl, "Material group (so you can test to make
" intermediate sums)
ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
"make sums)
gewei like marav-gewei, "weight unit (just to be complete)
end of imat.
Other data needed
field to store report name
data i_repid like sy-repid.
field to check table length
data i_lines like sy-tabix.
Data for ALV display
TYPE-POOLS: SLIS.
data int_fcat type SLIS_T_FIELDCAT_ALV.
select-options:
s_matnr for marav-matnr matchcode object MAT1.
start-of-selection.
read data into table imat
select * from marav
into corresponding fields of table imat
where
matnr in s_matnr.
Check if material was found
clear i_lines.
describe table imat lines i_lines.
if i_lines lt 1.
Using hardcoded write here for easy upload
write: /
'No materials found.'.
exit.
endif.
end-of-selection.
To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
The fieldcatalouge can be generated by FUNCTION
'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
report source, including this report.
Store report name
i_repid = sy-repid.
Create Fieldcatalogue from internal table
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = i_repid
I_INTERNAL_TABNAME = 'IMAT' "capital letters!
I_INCLNAME = i_repid
CHANGING
CT_FIELDCAT = int_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
*explanations:
I_PROGRAM_NAME is the program which calls this function
I_INTERNAL_TABNAME is the name of the internal table which you want
to display in ALV
I_INCLNAME is the ABAP-source where the internal table is defined
(DATA....)
CT_FIELDCAT contains the Fieldcatalouge that we need later for
ALV display
IF SY-SUBRC 0.
write: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
ENDIF.
*This was the fieldcatlogue
Call for ALV list display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = i_repid
IT_FIELDCAT = int_fcat
TABLES
T_OUTTAB = imat
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*explanations:
I_CALLBACK_PROGRAM is the program which calls this function
IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
now the data definition needed for display
I_SAVE allows the user to save his own layouts
T_OUTTAB contains the data to be displayed in ALV
IF SY-SUBRC 0.
write: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
ENDIF.
first learn basic programing afterwards
go through commands, statements , events, functional modules.....etc.
and implement these stuff, in programing,. and do practising.
Check the following links:
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
http://sap-img.com/
http://sapabaplive.blogspot.com/2007/07/download-abap-in-21-days.html
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
http://www.esnips.com/web/SAPAbapCertificationDocs/
Start with this.Refer this
For BDC:
http://myweb.dal.ca/hchinni/sap/bdc_home.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
Check these link:
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm -
i hav to jsp page
one is to view which data should delete
and the another jsp is to tel it is deleted or not
i am getting error in second jsp page
here is my first jsp page
<html>
<head>
<title>Delete an Project Record</title>
</head>
<%@ page language="java" import="java.sql.*"%>
<body bgcolor=LightBlue>
<h1>Delete an Project Record</h1>
<table border="1" width="400">
<tr>
<td><b>Project Id </b></td>
<td><b>Project Name </b></td>
<td><b>Client Name </b></td>
<td><b>Project Start Date </b></td>
<td><b>Estimated End Date</b></td>
<td><b>Project Manager </b></td>
<td><b>Estimated Effort </b></td>
<td><b>Delete? </b></td>
</tr>
<%
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
con = DriverManager.getConnection(url, username, password);
stmt=con.createStatement();
rs=stmt.executeQuery("select * from project");
if(rs != null)
while (rs.next())
String Project_id = rs.getString ("proj_id");
String Project_name=rs.getString ("proj_name");
String client_name=rs.getString ("client_name");
String start_date=rs.getString("strt_date");
String estimated_date=rs.getString("est_date");
String Project_mgr=rs.getString ("proj_mgr");
int est_effort=rs.getInt ("est_effort");
%>
<tr>
<td><%=Project_id %></td>
<td><%=Project_name %></td>
<td><%=client_name %></td>
<td><%=start_date %></td>
<td><%=estimated_date %></td>
<td><%=Project_mgr %></td>
<td><%=est_effort %></td>
<td><a href='delproc.jsp?Project_id=<%=Project_id %>'>delete</a></td>
</tr>
<%
stmt.close();
con.close();
%>
</table>
</form>
</body>
</html>
here is my second jsp page<html>
<head>
<title>Delete Project Processing</title>
</head>
<%@ page language="java"import="java.sql.*"%>
<body>
<%
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String Project_id =request.getParameter("proj_id");
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
Connection con = DriverManager.getConnection(url, username, password);
Statement stmt=con.createStatement();
int rowsAffected = stmt.executeUpdate("delete from project where proj_id=" + Project_id);
if(rowsAffected == 1)
%>
<h1> Successful Deletion </h1>
<%
else
%>
<h1> Sorry, Deletion has failed </h1>
<%
stmt.close();
con.close();
%>
</body>
</html>
and i am getting the result as sorry deletion has failed
plz tel me wer is the errori am not getting error
the next jsp page shows that sorry no deletion
can u check n tel me -
Hello,
I need to run the is it possible to run ESS in a WebSphere Portal? Did someone tried this before? How did you realize it?
Possible the best way would be to have a SAP Netweaver portal running too in order to inline the ESS-iViews in the websphere portal?
Thanks a lot for some hints and have a nice weekend,
VanessaHi, there is possible, but i understand you've to be careful with all the required connections, SSO config, where database user is located, and of course, good servers' capabilities and have ever a good technical background support to face issues.
There are some links:
http://www.sap.com/platform/netweaver/websphere.epx
http://www.sap.com/canada/solutions/pdf/BWP_WebSphere.pdf
http://www.gwug.org/artikel/download/WebSphere_und_SAP-Integration.pdf (excellent article)
You can check in Portal Implementation or another technical forum for estimated effort in time, technical difficulties, etc. Also please contact with your SAP Agent to know the license implications.
Regards! -
Give me some brief introduction on ABAP
Hi all
Give me some brief introduction on ABAPHi
Welcome to SDN
ABAP is one of many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting. ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the German meaning of "generic report preparation processor", but was later renamed to Advanced Business Application Programming. ABAP was one of the first languages to include the concept of Logical Databases (LDBs), which provides a high level of abstraction from the basic database level.
The ABAP programming language was originally used by SAP developers to develop the SAP R/3 platform. It was also intended to be used by SAP customers to enhance SAP applications customers can develop custom reports and interfaces with ABAP programming. The language is fairly easy to learn for programmers but it is not a tool for direct use by non-programmers. Good programming skills, including knowledge of relational database design and preferably also of object-oriented concepts, are required to create ABAP programs.
ABAP remains the language for creating programs for the client-server R/3 system, which SAP first released in 1992. As computer hardware evolved through the 1990s, more and more of SAP's applications and systems were written in ABAP. By 2001, all but the most basic functions were written in ABAP. In 1999, SAP released an object-oriented extension to ABAP called ABAP Objects, along with R/3 release 4.6.
SAP's most recent development platform, NetWeaver, supports both ABAP and Java.
Implementation
Where does the ABAP Program Run?
All ABAP programs reside inside the SAP database. They are not stored in separate external files like Java or C++ programs. In the database all ABAP code exists in two forms: source code, which can be viewed and edited with the ABAP workbench, and "compiled" code ("generated" code is the more correct technical term), which is loaded and interpreted by the ABAP runtime system. Code generation happens implicitly when a unit of ABAP code is first invoked. If the source code is changed later or if one of the data objects accessed by the program has changed (e.g. fields were added to a database table), then the code is automatically regenerated.
ABAP programs run in the SAP application server, under control of the runtime system, which is part of the SAP kernel. The runtime system is responsible for processing ABAP statements, controlling the flow logic of screens and responding to events (such as a user clicking on a screen button). A key component of the ABAP runtime system is the Database Interface, which turns database-independent ABAP statements ("Open SQL") into statements understood by the underlying DBMS ("Native SQL"). The database interface handles all the communication with the relational database on behalf of ABAP programs; it also contains extra features such as buffering of frequently accessed data in the local memory of the application server.
Basis
Basis sits between ABAP/4 and Operating system.Basis is like an operating system for R/3. It sits between the ABAP/4 code and the computer's operating system. SAP likes to call it middleware because it sits in the middle, between ABAP/4 and the operating system. Basis sits between ABAP/4 and the operating system. ABAP/4 cannot run directly on an operating system. It requires a set of programs (collectively called Basis) to load, interpret, and buffer its input and output. Basis, in some respects, is like the Windows environment. Windows starts up, and while running it provides an environment in which Windows programs can run. Without Windows, programs written for the Windows environment cannot run. Basis is to ABAP/4 programs as Windows is to Windows programs. Basis provides the runtime environment for ABAP/4 programs. Without Basis, ABAP/4 programs cannot run. When the operator starts up R/3, you can think of him as starting up Basis. Basis is a collection of R/3 system programs that present you with an interface. Using this interface the user can start ABAP/4 programs. To install Basis, an installer runs the program r3inst at the command-prompt level of the operating system. Like most installs, this creates a directory structure and copies a set of executables into it. These executables taken together as a unit form Basis.
To start up the R/3 system, the operator enters the startsap command. The Basis executables start up and stay running, accepting requests from the user to run ABAP/4 programs.
ABAP/4 programs run within the protective Basis environment; they are not executables that run on the operating system. Instead, Basis reads ABAP/4 code and interprets it into operating system instructions. ABAP/4 programs do not access operating system functions directly. Instead, they use Basis functions to perform file I/O and display data in windows. This level of isolation from the operating system enables ABAP/4 programs to be ported without modification to any system that supports R/3. This buffering is built right into the ABAP/4 language itself and is actually totally transparent to the programmer.
Basis makes ABAP/4 programs portable. The platforms that R/3 can run on are shown in Table. For example, if you write an ABAP/4 program on Digital UNIX with an Informix database and an OSF/Motif interface, that same program should run without modification on a Windows NT machine with an Oracle database and a Windows 95 interface. Or, it could run on an AS/400 with a DB2 database using OS/2 as the front-end.
SAP also provides a suite of tools for administering the Basis system. These tools perform tasks such as system performance monitoring, configuration, and system maintenance. To access the Basis administration tools from the main menu, choose the path Tools->Administration.
Platforms and Databases Supported by R/3
Operating Systems Supported Hardware Supported Front-Ends Supported Databases
AIX SINIX IBM SNI SUN Win 3.1/95/NT DB2 for AIX
SOLARIS HP-UX Digital HP OSF/Motif Informix-Online
Digital-UNIX Bull OS/2 Oracle 7.1
Windows NT AT&T Compaq Win 3.1/95/NT Oracle 7.1
Bull/Zenith OSF/Motif SQL Server 6.0
HP (Intel) SNI OS/2 ADABAS D
OS/400 AS/400 Win95 OS/2 DB2/400
SAP Systems and Landscapes
All SAP data exists and all SAP software runs in the context of an SAP system. A system consists of a central relational database and one or more application servers ("instances") accessing the data and programs in this database. A SAP system contains at least one instance but may contain more, mostly for reasons of sizing and performance. In a system with multiple instances, load balancing mechanisms ensure that the load is spread evenly over the available application servers.
Installations of the Web Application Server (landscapes) typically consist of three systems: one for development, one for testing and quality assurance, and one for production. The landscape may contain more systems, e.g. separate systems for unit testing and pre-production testing, or it may contain fewer, e.g. only development and production, without separate QA; nevertheless three is the most common configuration. ABAP programs are created and undergo first testing in the development system. Afterwards they are distributed to the other systems in the landscape. These actions take place under control of the Change and Transport System (CTS), which is responsible for concurrency control (e.g. preventing two developers from changing the same code at the same time), version management and deployment of programs on the QA and production systems.
The Web Application Server consists of three layers: the database layer, the application layer and the presentation layer. These layers may run on the same or on different physical machines. The database layer contains the relational database and the database software. The application layer contains the instance or instances of the system. All application processes, including the business transactions and the ABAP development, run on the application layer. The presentation layer handles the interaction with users of the system. Online access to ABAP application servers can go via a proprietary graphical interface, the SAPGUI, or via a Web browser.
Transactions
We call an execution of an ABAP program using a transaction code a transaction. There are dialog, report, parameter, variant, and as of release 6.10, OO transactions. A transaction is started by entering the transaction code in the input field on the standard toolbar, or by means of the ABAP statements CALL TRANSACTION or LEAVE TO TRANSACTION. Transaction codes can also be linked to screen elements or menu entries. Selecting such an element will start the transaction.
A transaction code is simply a twenty-character name connected with a Dynpro, another transaction code, or, as of release 6.10, a method of an ABAP program. Transaction codes linked with Dynpros are possible for executable programs, module pools, and function groups. Parameter transactions and variant transactions are linked with other transaction codes. Transaction codes that are linked with methods are allowed for all program types that can contain methods. Transaction codes are maintained in transaction SE93.
So, a transaction is nothing more than the SAP way of program executionbut why is it called transaction? ABAP is a language for business applications and the most important features of business applications were and still are are transactions. Since in the early days of SAP, the execution of a program often meant the same thing as carrying out a business transaction, the terms transaction and transaction code were chosen for program execution. But never mix up the technical meaning of a transaction with business transactions. For business transactions, it is the term LUW (Logical Unit of Work) that counts. And during one transaction (program execution), there can be many different LUWs.
Lets have a look at the different kind of transactions:
Dialog Transaction
These are the most common kind of transactions. The transaction code of a dialog transaction is linked to a Dynpro of an ABAP program. When the transaction is called, the respective program is loaded and the Dynpro is called. Therefore, a dialog transaction calls a Dynpro sequence rather than a program. Only during the execution of the Dynpro flow logic are the dialog modules of the ABAP program itself are called. The program flow can differ from execution to execution. You can even assign different dialog transaction codes to one program.
Parameter Transaction
In the definition of a parameter transaction code, a dialog transaction is linked with parameters. When you call a parameter transaction, the input fields of the initial Dynpro screen of the dialog transaction are filled with parameters. The display of the initial screen can be inhibited by specifying all mandatory input fields as parameters of the transaction.
Variant Transaction
In the definition of a variant transaction code, a dialog transaction is linked with a transaction variant. When a variant transaction is accessed, the dialog transaction is called and executed with the transaction variant. In transaction variants, you can assign default values to the input fields on several Dynpro screens in a transaction, change the attributes of screen elements, and hide entire screens. Transaction variants are maintained in transaction SHD0.
Report Transaction
A report transaction is the transaction code wrapping for starting the reporting process. The transaction code of a report transaction must be linked with the selection screen of an executable program. When you execute a report transaction, the runtime environment internally executes the ABAP statement SUBMITmore to come on that.
OO Transaction
A new kind of transaction as of release 6.10. The transaction code of an OO transaction is linked with a method of a local or global class. When the transaction is called, the corresponding program is loaded, for instance methods an object of the class is generated and the method is executed.
Types of ABAP programs
In ABAP, there are two different types of programs:
Report programs(Executable pools)
A Sample ReportReport programs AKA Executable pools follow a relatively simple programming model whereby a user optionally enters a set of parameters (e.g. a selection over a subset of data) and the program then uses the input parameters to produce a report in the form of an interactive list. The output from the report program is interactive because it is not a passive display; instead it enables the user, through ABAP language constructs, to obtain a more detailed view on specific data records via drill-down functions, or to invoke further processing through menu commands, for instance to sort the data in a different way or to filter the data according to selection criteria. This method of presenting reports has great advantages for users who must deal with large quantities of information and must also have the ability to examine this information in highly flexible ways, without being constrained by the rigid formatting or unmanageable size of "listing-like" reports. The ease with which such interactive reports can be developed is one of the most striking features of the ABAP language.
The term "report" is somewhat misleading in the sense that it is also possible to create report programs that modify the data in the underlying database instead of simply reading it.
A customized screen created using Screen Painter,which is one of the tool available in ABAP workbench(T-code = SE51).
Online programs
Online programs (also called module pools) do not produce lists. These programs define more complex patterns of user interaction using a collection of screens. The term screen refers to the actual, physical image that the users sees. Each screen also has a flow logic; this refers to the ABAP code invoked by the screens, i.e. the logic that initializes screens, responds to a users requests and controls the sequence between the screens of a module pool. Each screen has its own Flow Logic, which is divided into a "PBO" (Process Before Output) and "PAI" (Process After Input) section. In SAP documentation the term dynpro (dynamic program) refers to the combination of the screen and its Flow Logic.
Online programs are not invoked directly by their name, but are associated with a transaction code. Users can then invoke them through customizable, role-dependent, transaction menus.
Apart from reports and online programs, it is also possible to develop sharable code units such as class libraries, function libraries and subroutine pools.
Subroutine Pools
Subroutine pools, as the name implies, were created to contain selections of subroutines that can be called externally from other programs. Before release 6.10, this was the only way subroutine pools could be used. But besides subroutines, subroutine pools can also contain local classes and interfaces. As of release 6.10, you can connect transaction codes to methods. Therefore, you can now also call subroutine pools via transaction codes. This is the closest to a Java program you can get in ABAP: a subroutine pool with a class containing a method say main connected to a transaction code!
Type Pools
Type pools are the precursors to general type definitions in the ABAP Dictionary. Before release 4.0, only elementary data types and flat structures could be defined in the ABAP Dictionary. All other types that shouldve been generally available had to be defined with TYPES in type pools. As of release 4.0, type pools were only necessary for constants. As of release 6.40, constants can be declared in the public sections of global classes and type pools can be replaced by global classes.
Class Pools
Class pools serve as containers for exactly one global class. Besides the global class, they can contain global types and local classes/interfaces to be used in the global class. A class pool is loaded into memory by using one of its components. For example, a public method can be called from any ABAP program or via a transaction code connected to the method. You maintain class pools in the class builder.
Interface Pools
Interface pools serve as containers for exactly one global interfacenothing more and nothing less. You use an interface pool by implementing its interface in classes and by creating reference variables with the type of its interface. You maintain interface pools in the class builder.
ABAP Workbench
The ABAP Workbench contains different tools for editing Repository objects. These tools provide you with a wide range of assistance that covers the entire software development cycle. The most important tools for creating and editing Repository objects are:
ABAP Editor for writing and editing program code
ABAP Dictionary for processing database table definitions and retrieving global types
Menu Painter for designing the user interface (menu bar, standard toolbar, application toolbar, function key assignment)
Screen Painter for designing screens (dynamic programs) for user dialogs
Function Builder for displaying and processing function modules (routines with defined interfaces that are available throughout the system)
Class Builder for displaying and processing ABAP Objects classes
The ABAP Dictionary
Enforces data integrity
Manages data definitions without redundancy
Is tightly integrated with the rest of the ABAP/4 Development Workbench.
Enforcing data integrity is the process of ensuring that data entered into the system is logical, complete, and consistent. When data integrity rules are defined in the ABAP/4 Dictionary, the system automatically prevents the entry of invalid data. Defining the data integrity rules at the dictionary level means they only have to be defined once, rather than in each program that accesses that data.
The following are examples of data lacking integrity:
A date field with a month value of 13
An order assigned to a customer number that doesnt exist
An order not assigned to a customer
Managing data definitions without redundancy is the process of linking similar information to the same data definition. For example, a customer database is likely to contain a customers ID number in several places. The ABAP Dictionary provides the capability of defining the characteristics of a customer ID number in only one place. That central definition then can be used for each instance of a customer ID number.
The ABAP Dictionarys integration with the rest of the development environment enables ABAP programs to automatically recognize the names and characteristics of dictionary objects.
Additionally, the system provides easy navigation between development objects and dictionary definitions. For example, as a programmer, you can double-click on the name of a dictionary object in your program code, and the system will take you directly to the definition of that object in the ABAP/4 Dictionary.
When a dictionary object is changed, a program that references the changed object will automatically reference the new version the next time the program runs. Because ABAP is interpreted, it is not necessary to recompile programs that reference changed dictionary objects.
ABAP Syntax
The syntax of the ABAP programming language consists of the following elements:
Statements
An ABAP program consists of individual ABAP statements. Each statement begins with a keyword and ends with a period.
"Hello World" PROGRAM
WRITE 'Hello World'.
This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".
The keyword determines the category of the statement. For an overview of the different categories, refer to ABAP Statements.
Formatting ABAP Statements
ABAP has no format restrictions. You can enter statements in any format, so a statement can be indented, you can write several statements on one line, or spread a single statement over several lines.
You must separate words within a statement with at least one space. The system also interprets the end of line marker as a space.
The program fragment
PROGRAM TEST.
WRITE 'This is a statement'.
could also be written as follows:
PROGRAM TEST. WRITE 'This is a statement'.
or as follows:
PROGRAM
TEST.
WRITE
'This is a statement'.
Use this free formatting to make your programs easier to understand.
Special Case: Text Literals
Text literals are sequences of alphanumeric characters in the program code that are enclosed in quotation marks. If a text literal in an ABAP statement extends across more than one line, the following difficulties can occur:
All spaces between the quotation marks are interpreted as belonging to the text literal. Letters in text literals in a line that is not concluded with quotation marks are interpreted by the editor as uppercase. If you want to enter text literals that do not fit into a single line, you can use the & character to combine a succession of text literals into a single one.
The program fragment
PROGRAM TEST.
WRITE 'This
is
a statement'.
inserts all spaces between the quotation marks into the literal, and converts the letters to uppercase.
This program fragment
PROGRAM TEST.
WRITE 'This' &
' is ' &
'a statement'.
combines three text literals into one.
Chained Statements
The ABAP programming language allows you to concatenate consecutive statements with an identical first part into a chain statement.
To concatenate a sequence of separate statements, write the identical part only once and place a colon ( after it. After the colon, write the remaining parts of the individual statements, separating them with commas. Ensure that you place a period (.) after the last part to inform the system where the chain ends.
Statement sequence:
WRITE SPFLI-CITYFROM.
WRITE SPFLI-CITYTO.
WRITE SPFLI-AIRPTO.
Chain statement:
WRITE: SPFLI-CITYFROM, SPFLI-CITYTO, SPFLI-AIRPTO.
In the chain, a colon separates the beginning of the statement from the variable parts. After the colon or commas, you can insert any number of spaces.
You could, for example, write the same statement like this:
WRITE: SPFLI-CITYFROM,
SPFLI-CITYTO,
SPFLI-AIRPTO.
In a chain statement, the first part (before the colon) is not limited to the keyword of the statements.
Statement sequence:
SUM = SUM + 1.
SUM = SUM + 2.
SUM = SUM + 3.
SUM = SUM + 4.
Chain statement:
SUM = SUM + : 1, 2, 3, 4.
Comments
Comments are texts that you can write between the statements of your ABAP program to explain their purpose to a reader. Comments are distinguished by the preceding signs * (at the beginning of a line) and " (at any position in a line). If you want the entire line to be a comment, enter an asterisk (*) at the beginning of the line. The system then ignores the entire line when it generates the program. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. The system interprets comments indicated by double quotation marks as spaces.
PROGRAM SAPMTEST *
WRITTEN BY KARL BYTE, 06/27/1995 *
LAST CHANGED BY RITA DIGIT, 10/01/1995 *
TASK: DEMONSTRATION *
PROGRAM SAPMTEST.
DECLARATIONS *
DATA: FLAG " GLOBAL FLAG
NUMBER TYPE I " COUNTER
PROCESSING BLOCKS *
Advantages of ABAP over Contemporary languages
ABAP OBJECTS
Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
ABAP Statements an Overview
The first element of an ABAP statement is the ABAP keyword. This determines the category of the statement. The different statement categories are as follows:
Declarative Statements
These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.
Examples of declarative keywords:
TYPES, DATA, TABLES
Modularization Statements
These statements define the processing blocks in an ABAP program.
The modularization keywords can be further divided into:
· Defining keywords
You use statements containing these keywords to define subroutines, function modules, dialog modules and methods. You conclude these processing blocks using the END statements.
Examples of definitive keywords:
METHOD ... ENDMETHOD, FUNCTION ... ENDFUNCTION, MODULE ... ENDMODULE.
· Event keywords
You use statements containing these keywords to define event blocks. There are no special statements to conclude processing blocks - they end when the next processing block is introduced.
Examples of event key words:
AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMAND
Control Statements
You use these statements to control the flow of an ABAP program within a processing block according to certain conditions.
Examples of control keywords:
IF, WHILE, CASE
Call Statements
You use these statements to call processing blocks that you have already defined using modularization statements. The blocks you call can either be in the same ABAP program or in a different program.
Examples of call keywords:
CALL METHOD, CALL TRANSACTION, SUBMIT, LEAVE TO
Operational Statements These keywords process the data that you have defined using declarative statements.
Examples of operational keywords:
MOVE, ADD
Unique Concept of Internal Table in ABAP
Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
Internal Tables as Data Types
Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
Line type
The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
Key
The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
Table type
The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
Generic Internal Tables
Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
Internal Tables as Dynamic Data Objects
Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
Choosing a Table Type
The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
Standard tables
This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
Sorted tables
This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
Hashed tables
This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
Advanced Topics
Batch Input: Concepts
Processing Sessions
The above figure shows how a batch input session works.A batch input session is a set of one or more calls to transactions along with the data to be processed by the transactions. The system normally executes the transactions in a session non-interactively, allowing rapid entry of bulk data into an R/3 System.
A session records transactions and data in a special format that can be interpreted by the R/3 System. When the System reads a session, it uses the data in the session to simulate on-line entry of transactions and data. The System can call transactions and enter data using most of the facilities that are available to interactive users.
For example, the data that a session enters into transaction screens is subject to the same consistency checking as in normal interactive operation. Further, batch input sessions are subject to the user-based authorization checking that is performed by the system.
Advantages of ABAP over Contemporary languages
ABAP Objects offers a number of advantages, even if you want to continue using procedural programming. If you want to use new ABAP features, you have to use object-oriented interfaces anyway.
Sharing Data: With ABAP shared objects, you can aggregate data once at a central location and the different users and programs can then access this data without the need for copying.
Exception Handling: With the class-based exception concept of ABAP, you can define a special control flow for a specific error situation and provide the user with information about the error.
Developing Persistency: For permanent storage of data in ABAP, you use relational database tables by means of database-independent Open SQL, which is integrated in ABAP. However, you can also store selected objects transparently or access the integrated database or other databases using proprietary SQL.
Connectivity and Interoperability: The Exchange Infrastructure and Web services are the means by which developers can implement a service-oriented architecture. With Web services, you can provide and consume services independently of implementation or protocol. Furthermore, you can do so within NetWeaver and in the communication with other systems. With the features of the Exchange Infrastructure, you can enable, manage, and adapt integration scenarios between systems.
Making Enhancements: With the Enhancement Framework, you can enhance programs, function modules, and global classes without modification as well as replace existing code. The Switch Framework enables you activate only specific development objects or enhancements in a system.
Considerable Aspects
It follows a list of aspects to be considered during development. The list of course is not complete.
Dynpro persistence
When implementing dynpros one has to care for himself to read out and persist the necessary fields. Recently it happened to me that I forgot to include a field into the UPDATE-clause which is an error not so easy to uncover if you have other problems to be solved in the same package. Here, tool-support or built-in mechanisms would help.
The developer could help himself out by creating something like a document containing a cookbook or guide in which parts of a dynpro logic one has to care about persistence. With that at hand, it would be quite easy finding those bugs in short time. Maybe a report scanning for the definition of the dynpro fields to be persisted could scan the code automatically, too.
Memory Cache
It should be common-sense that avoiding select-statements onto the database helps reducing the server load. For that the programmer either can resort to function modules if available. This maybe is the case for important tables. Or the programmer needs to implement his own logic using internal tables. Here, the standard software package could provide the developer with a tool or a mechanism auto-generating memory cached tables resp. function modules implementing this.
Sometimes buffering of database tables could be used, if applicable. But that would require an effort in customizing the system and could drain down system performance overall, especially if a table is involved that has a central role.
Interfaces
It should be noticed that some function modules available have an incomplete interface. That means, the interface does not include all parameters evaluated by the logic of the function module. For example, global variables from within the function group could be read out, which cannot be influenced by the general caller. Or memory parameters are used internally to feed the logic with further information.
One workaround here would be copying the relevant parts of the logic to a newly created function module and then adapt it to the own context. This sometimes is possible, maybe if the copied code is not too lengthy and only a few or no calls to other logic is part of it.
A modification of the SAP code could be considered, if the modification itself is unavoidable (or another solution would be not justifiable by estimated effort to spend on it) and if the location of the modification seems quite safe against future upgrades or hot fixes. The latter is something that could be evaluated by contacting the SAP hotline or working with OSS message (searching thru existing one, perhaps open a new one).
Example
'From SAP NetWeaver:'
set an exclusive lock at level object-type & object-id
IF NOT lf_bapi_error = true.
IF ( NOT istourhd-doc_type IS INITIAL ) AND
( NOT istourhd-doc_id IS INITIAL )
CALL FUNCTION 'ENQUEUE_/DSD/E_HH_RAREF'
EXPORTING
obj_typ = istourhd-doc_type
obj_id = istourhd-doc_id
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
terminate processing...
lf_bapi_error = true.
...and add message to return table
PERFORM set_msg_to_bapiret2
USING sy-msgid gc_abort sy-msgno
sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
gc_istourhd gc_enqueue_refdoc space
CHANGING lt_return.
ENDIF.
ENDIF.
ENDIF. " bapi error
Example Report(Type - ALV(Advanced List Viewer))
REPORT Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB .
*Simple example to use ALV and to define the ALV data in an internal
*table
*data definition
tables:
marav. "Table MARA and table MAKT
Data to be displayed in ALV
Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
matically determine the fieldstructure from this source program
Data:
begin of imat occurs 100,
matnr like marav-matnr, "Material number
maktx like marav-maktx, "Material short text
matkl like marav-matkl, "Material group (so you can test to make
" intermediate sums)
ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
"make sums)
gewei like marav-gewei, "weight unit (just to be complete)
end of imat.
Other data needed
field to store report name
data i_repid like sy-repid.
field to check table length
data i_lines like sy-tabix.
Data for ALV display
TYPE-POOLS: SLIS.
data int_fcat type SLIS_T_FIELDCAT_ALV.
select-options:
s_matnr for marav-matnr matchcode object MAT1.
start-of-selection.
read data into table imat
select * from marav
into corresponding fields of table imat
where
matnr in s_matnr.
Check if material was found
clear i_lines.
describe table imat lines i_lines.
if i_lines lt 1.
Using hardcoded write here for easy upload
write: /
'No materials found.'.
exit.
endif.
end-of-selection.
To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
The fieldcatalouge can be generated by FUNCTION
'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
report source, including this report.
Store report name
i_repid = sy-repid.
Create Fieldcatalogue from internal table
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = i_repid
I_INTERNAL_TABNAME = 'IMAT' "capital letters!
I_INCLNAME = i_repid
CHANGING
CT_FIELDCAT = int_fcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
*explanations:
I_PROGRAM_NAME is the program which calls this function
I_INTERNAL_TABNAME is the name of the internal table which you want
to display in ALV
I_INCLNAME is the ABAP-source where the internal table is defined
(DATA....)
CT_FIELDCAT contains the Fieldcatalouge that we need later for
ALV display
IF SY-SUBRC <> 0.
write: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
ENDIF.
*This was the fieldcatlogue
Call for ALV list display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = i_repid
IT_FIELDCAT = int_fcat
TABLES
T_OUTTAB = imat
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*explanations:
I_CALLBACK_PROGRAM is the program which calls this function
IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
now the data definition needed for display
I_SAVE allows the user to save his own layouts
T_OUTTAB contains the data to be displayed in ALV
IF SY-SUBRC <> 0.
write: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
ENDIF.
Reward points for useful Answers
Regards
Anji -
Help me plz, deleting in jsp
hi to all,
i created one jsp page to view the database list
<html>
<head>
<title>Delete an Project Record</title>
</head>
<%@ page language="java" import="java.sql.*"%>
<body bgcolor=LightCyan>
<h1>Delete an Project Record</h1>
<table border="1" width="400">
<tr>
<td><b>Project Id </b></td>
<td><b>Project Name </b></td>
<td><b>Client Name </b></td>
<td><b>Project Start Date </b></td>
<td><b>Estimated End Date</b></td>
<td><b>Project Manager </b></td>
<td><b>Estimated Effort </b></td>
<td><b>Delete? </b></td>
</tr>
<%
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep"; con = DriverManager.getConnection(url, username, password);
stmt=con.createStatement();
rs=stmt.executeQuery("select * from project");
if(rs != null)
while (rs.next())
String Project_id = rs.getString ("proj_id");
String Project_name=rs.getString ("proj_name");
String client_name=rs.getString ("client_name");
String start_date=rs.getString("strt_date");
String estimated_date=rs.getString("est_date");
String Project_mgr=rs.getString ("proj_mgr");
int est_effort=rs.getInt ("est_effort");
%>
<tr>
<td><%=Project_id %></td>
<td><%=Project_name %></td>
<td><%=client_name %></td>
<td><%=start_date %></td>
<td><%=estimated_date %></td>
<td><%=Project_mgr %></td>
<td><%=est_effort %></td>
<td><a href='delproc.jsp?Project_id=<%=Project_id %>'>delete</a></td>
</tr>
<%
stmt.close();
con.close();
%>
</table>
</body>
</html>
the result of this page was this
Delete an Project Record
Project Id Project Name Client Name Project Start Date Estimated End Date Project Manager Estimated Effort Delete?
p001 enet tratum 2006-02-20 2006-04-20 raghunath 80 delete
p002 tenet tratums 2006-03-20 2006-05-20 raghu 40 delete
then i created another jsp page to see the result of the deletion
<html>
<head>
<title>Delete Project Processing</title>
</head>
<%@ page language="java" import="java.sql.*"%>
<body bgcolor=LightGreen>
<%
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String Project_id=request.getParameter("proj_id");
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
Connection con = DriverManager.getConnection(url, username, password);
Statement stmt=con.createStatement();
int rowsAffected = stmt.executeUpdate("delete from project where proj_name="+Project_id);
if(rowsAffected == 1)
%>
<h1> Successful Deletion </h1>
<%
else
%>
<h1> Sorry, Deletion has failed </h1>
<%
stmt.close();
con.close();
%>
</body>
</html>
but here i am getting result as sorry deletion has failed
wat should the problem in deleting the database i cant able to found
if anyone knows plz replyhai to all
in here my first jsp page shows wat are all in the database are seen
in my second jsp page iam getting output as DELECTION has failed
plz tel me if any one knows
ther is a problem in my second jsp page at this lines
<%
String driverName = "com.mysql.jdbc.Driver";
Class.forName(driverName);
String Project_id = request.getParameter("proj_id");
String serverName = "192.168.10.5";
String mydatabase = "Trainees";
String url = "jdbc:mysql://" + serverName + "/" + mydatabase; // a JDBC url
String username = "josep";
String password = "josep";
Connection con = DriverManager.getConnection(url, username, password);
Statement stmt=con.createStatement();
int rowsAffected=stmt.executeUpdate("delete from project where proj_id= "+Project_id);
if(rowsAffected ==1)
%>
<h1> Successful Deletion </h1>
<%
else
%>
<h1> Deletion has failed </h1>
<%
stmt.close();
con.close();
%> -
Reporting for PIRs: actual consumption against plan
Hi all,
can you recommend what standard reports can show actual consumption figures against plan in PIRs. Collective report is needed, looks like rows with columns for material code, plan figure, consumed figure and this is for given periods. And plan figure should be quantitiy without reduction quantities (that is initial quantitiy in PIR).
Thanks in advance!Vivek wrote:
I would still suggest, use the report (shouldn't take more than 30 mins. of your time) & it would greatly help in your 'estimation effort'.
Thank you for your suggestion.
I can start this transaction (MD73) and see some figures, but cannot make GI due to some reasons in existing environment (migo goes into dump). That is why I'm asking about reduction, what results will be showm by this report - planned figures as originally planned or reduced ones after issuing.
Maybe you are looking for
-
Oracle 8.1.5 on Windows 2000
I have some problems with the TNS listener. Does anywone know if this version of Oracle runs properly on Windows 2000? Please help thanks
-
Reading text file from forms6i
hi all , i want to read a text file how can i classify its coordinates (columns) to insert it into different columns of a table . i want that first ten characters of text file will go in first column of table , next 5 characters will go into 2nd colu
-
Muse not publishing properly to Business Catalyst
I'm building a portfolio website in Muse. It's all laid out right in the design screen, but when I publish it to my .businesscatalyst domain, a few of the sections get cut out and I have no idea why it isn't exporting exactly what I'm seeing in my de
-
How to display stored image in jsp in ie7???
i am using internet explore7. i have a problem when i am displaying an image in jsp its not properly coming. this image and image is stored in database. image is stored in database using "binarystream" . i am just simply calling the image path and us
-
Parameter rsau/local/file does not exist
I would like to activate the paramater rsau/local/file, but it does not exist. The version i'm using now is ECC 6.0. Is it because the parameter is different in ecc6.0 or anywhere I can set the location for the security audit log?