Você está na página 1de 52

Client/Server Principles

In SAP terminology, a service means a service provided by a software component (software-oriented view). This component can consist of a process (compare wor process) or a gro!p of processes (compare application server) and is then called a server for that service. Software components that !se this service are called clients. At the same time, clients can also be servers for specific services. A server often also means a comp!ter (host) on which software components that provide specific services are r!nning (hardware-oriented view).

SAP System Client/Server Configurations


The f!ndamental services in a b!siness application system are presentation services, application services, and database services. In a one-tier SAP config!ration, all processing tas s are performed on one server, as in classic mainframe processing. Twotier SAP System config!rations are !s!ally implemented !sing special presentation servers that are responsible solely for formatting the graphical !ser interface. "any SAP System !sers !se #indows P$s for e%ample as presentation servers. An alternative twotier config!ration (not shown) is to install powerf!l des top systems and to !se these for presentation and applications also (two-tier client&server). This type of config!ration is partic!larly !sef!l for processing-intensive applications (s!ch as sim!lations) or for software developers, b!t d!e to the additional administration re'!irements is !s!ally !sed for test p!rposes only.

In a three-tier config!ration, separate servers are !sed for each tier. (sing data from the database server, several different application servers can operate at the same time. To ens!re that the load on individ!al servers is as even as possible and to achieve optimal performance, yo! can !se special application servers for individ!al application areas s!ch as distrib!tion or financial acco!nting (logon and load balancing).

SAP Database Interface


Today, large amo!nts of data are !s!ally administered !sing relational database management systems ()*+"S). These systems store the data and the relationships between the data in two-dimensional tables, which are nown for their logical simplicity. The definitions of the data, tables, and table relationships are stored in the data dictionary of the )*+"S. #ithin A+AP, SAP ,P-. S/0 is !sed to access application data in the database, independent of the corresponding )*+"S. The SAP database interface converts the open S/0 statements from the A+AP statements into the corresponding database statements. This means that application programs written in A+AP are databaseindependent. .ative S/0 commands can be !sed in A+AP. #hen interpreting open S/0 statements, the SAP database interface chec s the synta% of these statements and a!tomatically ens!res the local SAP b!ffers in the shared memory of the application server are !tili1ed optimally. *ata fre'!ently re'!ired by the applications is stored in these b!ffers so that the system does not have to access the database server to read this data. In partic!lar, all technical data s!ch as A+AP programs, screens, and A+AP *ictionary information, as well as some b!siness process parameters !s!ally remain !nchanged in a r!nning system, ma ing them ideal b!ffering candidates.

The same applies to certain b!siness application data, which is accessed as read-only

SAP Application Services


The operating system views the SAP r!ntime system as a gro!p of parallel, cooperating processes. ,n each application server these processes incl!de the dispatcher as well as wor processes2 the n!mber of wor processes depends on the available reso!rces. #or processes may be installed for dialog processing, !pdate, dialog free bac gro!nd processing and spooling. In addition to these wor process types (dialog processing (*), !pdate (34 for the 5erman 63erb!ch!ng7), loc management (-), bac gro!nd processing (+), spool (S), the SAP r!ntime system provides two additional services for internal and e%ternal comm!nication (below are the restrictions on the n!mber of wor processes)4 The message server ("S or ") comm!nicates between the distrib!ted dispatchers within the SAP System and is therefore the prere'!isite for scalability !sing several parallelprocessing application servers. The gateway server (5# or 5) allows comm!nication between SAP, )&8 and e%ternal application systems.

*ialog4 -very dispatcher re'!ires at least two dialog wor processes Spool4 At least one for each SAP System (more than one allowed for each dispatcher) (pdate4 At least one for each SAP System (more than one allowed for each dispatcher)

+ac gro!nd processing4 At least two for each SAP System (more than one allowed for each dispatcher) -n'!e!e4 ,nly one en'!e!e wor process is needed for each system

SAP Application Hierarchy


9o! can view the )epository str!ct!re in the application hierarchy. 9o! can navigate to the application hierarchy from the initial screen !sing Tools -: A+AP #or bench -: ,verview -: Application ;ierarchy. (Transaction S-<=). The application components are displayed in a tree str!ct!re in the application hierarchy. -%panding a component displays all the development classes that are assigned to that component. 9o! can select a s!b-tree and navigate from the application hierarchy to the )epository Information System. The system then collects all development classes for the s!b-tree selected and passes them to the Information System.

Logging on to the SAP system

The SAP System is a client system. The client concept enables the >oint operation, in one system, of several enterprises that are independent of each other in b!siness terms. *!ring each !ser session yo! can only access the data of the client selected d!ring the logon. A client is, in organi1ational terms, an independent !nit in the SAP System. -ach client has its own data environment and therefore its own master data and transaction data, assigned !ser master records and charts of acco!nts, and specific c!stomi1ing parameters. A !ser master record lin ed to the relevant client m!st be created for !sers to be able to log on to the system. To protect access, a password is re'!ired for logon. The password is hidden as yo! type (yo! only see asteris s). SAP systems are available in several lang!ages. (se the 0ang!age inp!t field to select the logon lang!age for each session. "!ltiple logons are always logged in the system beginning with )elease ?.@. This is for sec!rity as well as licensing reasons. A warning

message appears if the same !ser attempts to log on twice or more. This message offers three options4

$ontin!e with c!rrent logon and end any other logons in the system $ontin!e with c!rrent logon witho!t ending any other logons in the system (logged in system) Terminate c!rrent logon

SAP Screen Elements

Command field4 9o! can !se the command field to go to applications directly by entering the transaction code. 9o! can find the transaction code either in the SAP -asy Access men! tree (see ne%t slide) or in the relevant application !nder SystemA Stat!s. enu bar! The men!s shown here depend on which application yo! are wor ing in. These men!s contain cascading men! options. Standard toolbar! The icons in the system f!nction bar are available on all SAP screens. Any icons that yo! cannot !se on a partic!lar screen are dimmed. If yo! leave the c!rsor on an icon for a moment, a small flag will appear with the name (or f!nction) of that icon. 9o! will also see the corresponding f!nction ey. The application toolbar shows yo! which f!nctions are available in the c!rrent application. "itle bar! The title bar displays yo!r c!rrent position and activity in the system.

Chec# bo$es! $hec bo%es allow yo! to select several options sim!ltaneo!sly within a gro!p. %adio buttons! )adio b!ttons allow yo! to select one option only. Status bar! The stat!s bar displays information on the c!rrent system stat!s, for e%ample, warning and error messages. A tab provides a clearer overview of several information screens. &ptions! 9o! can set yo!r font si1e, list colors, and so on here.

SAP Easy Access Standard

SAP -asy Access is the standard entry screen displayed after logon. (sing the men! path -%trasA Set start transaction yo! can select a transaction of yo!r choice to be the defa!lt entry screen after logon. 9o! navigate thro!gh the system !sing a compact tree str!ct!re that yo! can adapt to yo!r own specific re'!irements. (se the men! path -%trasA Settings to change yo!r view of the tree str!ct!re. 9o! can !se this to display technical names (transaction codes). 9o! can also create a Bavorites list of the transactions, reports, files and #eb sites yo! !se most.

9o! can add items to yo!r favorites list !sing the Bavorites men! option or by simply dragging C dropping them with the mo!se.

SAP "ransactions

Transactions form the basis of SAP program processing. A transaction is the smallest step that can be e%ec!ted by the !ser. ? D 8E character transaction codes are commonly !sed to '!ic ly access specific screens in SAP. Transaction codes are entered in the ,F ($ommand) field in the SAP System. A n!mber of commands are provided to facilitate SAP session management and transaction processing Transaction codes are stored in table TST$. The transaction code of a partic!lar screen can be easily identified by accessing the System men! and choosing the 6Stat!s7 option. The transaction code will be displayed in the7Sap *ata&)epository *ata&Transaction7 field.

E$ample "ransaction Codes! S-<E D )epository +rowser S-G< D A+AP -ditor S-== D A+AP *ictionary S"E? D ,verview of (sers &' (ield Commands! &o D 0ists !serHs sessions &o%%%% D $reates a new session and starts transaction %%%% &n D $ancels c!rrent transaction &n%%%% D $ancels c!rrent transaction and starts transaction %%%% &h D T!rns on *eb!gger mode &nend D 0ogs off &i D *eletes c!rrent session

SAP Sessions
A 6session7 is an independent window to wor in. "!ltiple sessions allow several tas s to be wor ed on at once. To open a new session, select 6$reate session7 from the System men! or !se transaction 6&o%%%%7. -ach !ser can have !p to si% parallel sessions open. When logging on to a system with more than one user ID, or onto multiple clients on the same system (for example, some servers have one client for coding and another client for testing) be sure not to confuse the different sessions!

SAP )eneral System (unctions

$reate session D starts a parallel session -nd session D terminates the c!rrent session (ser profile D provides !ser info (defa!lts, address, parameters) Services D start reports, display and maintain tables (tilities D access to deb!gger, S/0 trace, reso!rce !sage 0ist D find character string, download code, print, save to reporting tree #or flow D Access SAP #or flow ,wn spool re'!ests D shows spool re'!est for specified selection ,wn >ob D displays stat!s of the SAP !serHs bac gro!nd >obs Short message D allows the !ser to send a message to another SAP !ser Stat!s D displays !ser C system data (eg., c!rrent screen&transaction code etc.) 0og off D closes all parallel sessions for c!rrent logon I*

The system men! can be accessed from all SAP transactions. The System Services men! contains, among others, the following options4

)eporting4 Starts reports (A+AP programs). ,!tp!t controller4 This is where yo! manage !ser-specific print re'!ests. Table maintenance4 This is where yo! process tables and views.

+atch inp!t4 Administers batch inp!t sessions and data transfer. Iobs4 This is where yo! can administer >obs that are processed in the bac gro!nd. SAP Service4 -nables yo! to log on to SAPHs SAP.et SAP Brontend

SAP Help on Screen (ields

(sers can get help on fields by pressing 6B=7 or clic ing the help b!tton on the toolbar when the c!rsor is positioned in the field in '!estion. A list of possible entries for a field can be obtained by pressing 6B?7 or clic ing the arrow to the right of the field (see diagram, left). To select a val!e from the possible entry list, do!ble clic the entry or position the c!rsor on the val!e and press 6B87. (sers can get ob>ect-specific information (for e%ample, abo!t fields, new options, messages, etc.) anywhere in the system by positioning the c!rsor on the relevant ob>ect and pressing B=. Search helps are A+AP dictionary ob>ects designed to provide the !sers with a mechanism to search for and then select the appropriate field val!es. Search helps

are !sed to define inp!t help (B? help) for screen fields. Search fields are fields whose possible inp!t val!es are so!ght in the possible entries (B? help) process.

Creating a table in SAP ABAP


8? *ec 8E== J A+AP ;ere are the steps re'!ired to create a table in SAP A+AP. Step =4 5o to transaction S-== and inp!t a table name.

Step 84 In the *ictionary men!4Select the *atabase table option and enter the name of the table to be created (for our example, use ZW !"). $lic on the $reate option.It will ta e yo! to the screen shown below Short te$t! Short description of the table. (#est #able) ,n the Attrib!tes tab4 Delivery Class! Indicates who is responsible for maintaining the table, whether it is a parameteri1ation table, etc. (We shall specify type , $ pplication)% "able maintenance allo*ed! -nable&disable modifications to the table while its contents are being viewed. (If this is not mar ed, the table registers cannot be modified d!ring a display transaction). (&ar' this with an ()

,n the Bields tab4 (ields! The name of the field. 'ey! Indicates whether the field is part of the primary ey for the table. A field or gro!p of fields form a ey for a table if they identify one !ni'!e register in the table. -very table m!st have a primary ey. (ield type! The name of the data element that describes the field. (K) Data + Length! The type and length of the data. (K) Chec# table4 A LKH will appear in this table when the data element introd!ced refers to a domain which has a table of permitted val!es or when it is associated with a foreign ey (See later). Short te$t! *escription of the field. (K) (K) It is possible to define table fields that are not lin ed to data elements. #e can define their type, length and description directly. To create these fields !se the *ata -lement&*irect type b!tton. To ret!rn to !sing data elements, clic on this b!tton a second time. (Altho!gh this possibility e%ists, it is not recommended). ,n the $!rrency&'!ant. fields tab. %eference table + %ef, (ield! ,nly monetary fields ($())) and '!antity fields (/(A.) need to be referenced to other fields in the dictionary. +oth the table and the field m!st be specified for these reference fields. The reference fields m!st be of type $!rrency Fey ($(F9) for c!rrency fields and type (.IT for '!antity fields. This means that when the data is displayed its format will incl!de the val!e in the field to which it is referenced. ,nce all the entries all completed, press the 6Technical Settings7 b!tton on the application toolbar or select 5oto M Technical Settings from the men!.

The *ata *ictionary will prompt to save the table and the provide an development class (and re'!est n!mber, if applicable). The development class and re'!est are e%actly the same as e%plained with relation to the A+AP editor and programs.

Data Class! The data class is !sed to provide a logical definition of the physical location in the database where the table will be saved. The physical location for the table will be determined by the !se to which it will be p!t, e.g., mainly for !pdating, or for cons!lting the data. Bor e%ample, tables that contain master data will not be !pdated often b!t will be cons!lted fre'!ently ()or our example, use **!+) Si-e category! This indicates appro%imately the n!mber of registers that the table will hold. (,elect si-e .) #hen finished, clic on the chec b!tton ($trl N B8), the save b!tton (B==) and then activate ($trl N BG). )et!rn to the initial screen by clic ing on the b!tton (BG), then chec ($trl N B8) and finally activate the table ($trl N BG). The concept of +!ffering is e%plained in a later slide.

An inde% involves ordering the registers in a table according to the val!es in one or more of its fields. $onse'!ently, defining an inde% consists in indicating the fields !sed for it. $hec ($trl N B8), save and activate ($trl N BG) the table before creating an inde%. If no inde%es have been defined for the table, a pop!p dialog bo% will appear as ing yo! if yo! want to create an inde%. #hen yo! clic the 69es7 b!tton in the pop!p, a window will appear as ing for an identifier for the inde%% (We shall use Z+"). This ta es !s to the screen shown above where we introd!ce the fields that compose the inde%. Short te$t! *escription of the inde%. (Index by /ompany code%)

.ni/ue Inde$ / 0on1uni/ue! If we mar the !ni'!e inde% option, we shall create a !ni'!e inde%, i.e., no more than one entry is allowed in the table having the same val!es for the inde% fields. (ield name! The fields that form the inde%. #e can type in the names of the fields or select them by clic ing on the b!tton. (In our case, select the & 0D# and 1234, fields)% #hen the inde% fields have been defined, save the definition (B==), chec it ($trl N B8) and activate it ($trl N BG).

Create a Program in SAP ABAP


8= .ov 8E== J A+AP Programs 9o! can navigate to the A+AP -ditor thro!gh the "en!. 9o! can also create favorites for certain transactions and p!t it into yo!r c!stom men!. 9o! can type S-G< from anywhere in the SAP environment to redirect yo! to the A+AP editor (m!st come o!t to a Area "en! or prefi% transaction code with &n). Tools s!ch as the B!nction +!ilder, *ata *ictionary, Screen Painter and "en! Painter are integrated to the A+AP editor and yo! can navigate to the -ditor and load the corresponding program by do!ble-clic ing on a program name on a Program field. The A+AP -ditor can be !sed to create Programs of different types ("od!le Pool, )eport, Incl!de, S!bro!tine Pool, etc.)

Steps to create a Program in SAP A2AP


Creating Program Step 1

As indicated before, the A+AP -ditor can be !sed to create "od!le Pool (*ialog Programs), )eport Programs (which o!tp!t lists or reports by accessing the database), Incl!des (non e%ec!table programs which can be incl!ded into a main program), S!bro!tine Pool (a collection of s!bro!tines which can be re!sed) and several other types of programs. ,n the A+AP -ditor4 Initial Screen, a program name sho!ld be given and 6$reate7 p!sh b!tton needs to be pressed. A *eveloper Fey maybe re'!ired for the specific !ser to create&edit programs. This is s!pplied by SAP. All c!stom programs sho!ld begin with 6O7 or 697 if they are report programs. There are other specific conventions that need to be !sed for creation of c!stom "od!le Pools (SAP"O%%%%%), c!stom S!bro!tine Pools (SAPBO%%%%%), etc. which are covered in later topics.

Creating Program Step 2

-nter the Title (a description), Type (s!ch as -%ec!table Program, "od!le Pool, etc. )ight now enter -%ec!table Program) $hoose an Application and a Stat!s for the Program (these are all informational attrib!tes) The chec bo% for 6Bi%ed Point Arithmetic7 is mostly chec ed. This is to indicate that Bi%ed point arithmetic will be !sed to perform all calc!lations. If it is not chec ed, pac ed n!mbers (*ecimals in A+AP) will be treated as integers when !sed in assignments and calc!lations. +y chec ing the 6-ditor 0oc 7 chec bo%, one co!ld prevent other !sers from ma ing changes to the program. ,nce all the attrib!tes have been filled, press the 6Save7 +!tton.

Creating Program Step 3

-nter the development class in this dialog bo%. A *evelopment class gro!ps together a set of related A+AP wor bench ob>ects. Programs, Tables, Str!ct!res, "en!s, Screens, "essages, and even data can be assigned a development class. A *evelopment class is partic!larly !sef!l when transporting ,b>ects from one SAP 6Instance7 ()&G system) to another. 9o! co!ld create a new development class from the ,b>ect .avigator (also called the )epository +rowser). An ob>ect can be created as a 0ocal ,b>ect which wo!ld be specific to the !ser. A development class PT"P is assigned to s!ch local ob>ects. 0ocal ,b>ects cannot be transported to other SAP Instances.

Creating Program Step 4

If a valid development class had been assigned in the previo!s step (.,T applicable for 60ocal ,b>ects7), then the system as s for a transport re'!est. A transport re'!est is !sed to trac the changes and can be !sed to4 o 5ro!p related changes to a re'!est n!mber o P!ll bac changes made against a certain re'!est n!mber o Transport ob>ects to another SAP Instance Transports are managed in a $orrection and Transportation System ($TS) which can be accessed by the transactions S-E=, S-EQ and S-=E.

Creating Program Step 5

The program now appears in the editor. A+AP code can be incorporated into the program after the 6)-P,)T7 statement. If a chec synta% is r!n on the program, any synta% errors are thrown on the same window on the bottom portion. $lic ing on a synta% error ta es yo! to the appropriate line. $orrect the errors (if any). Activate the program ($trlNBG can be !sed as a shortc!t) before e%ec!ting it. All programs need to be activated before e%ec!ting.

Introduction to ABAP Workbench


? ,ct 8E== J A+AP The A+AP #or bench is the integrated development environment available in SAP which allows for !sers to maintain A+AP ob>ects s!ch as Programs, Screens, "en!s, *ictionary ,b>ects (s!ch as Tables, 3iews, Str!ct!res, etc.), "essages, and other ob>ects

which aid in the development and enhancement of the SAP environment.

3hat is the A2AP 3or#bench


5raphical programming environment

(se it to create A+AP Applications -nhance and change e%isting SAP Applications

(se it to to do the following4


#rite A+AP $ode *esign dialogs or Screens $reate "en!s with the "en! Painter "aintain *atabase ob>ects *eb!g an Application *o performance Analyses "anage $onflicts and 3ersions

The A+AP wor bench is a highly sophisticated lang!age environment which can be !sed to develop applications in the A+AP programming lang!ages. #hether it be to develop report programs, mod!le pools (dialog programs), f!nction mod!les or to ma e

enhancements to e%isting SAP programs, the #or bench provides an e%cellent 0ang!age -nvironment which can be effectively !tili1ed to b!ild A+AP applications The tight integration between the different components of the #or bench, the easy navigation provided within and between the different tools, the conte%t-sensitive help provided to p!ll !p information abo!t any field, A+AP statement, Table, Str!ct!re etc. ma es it probably one of the best 0ang!age environments available in the mar et.

A2AP 3or#bench

enus Layout

&vervie* Provides tools that help yo! s!rvey the ob>ects in yo!r system. 9o! !se the f!nctions in this men! to locate ob>ects by application, type, or development class. Application ;ierarchy, ,b>ect .avigator ()epository +rowser), +!siness ,b>ect +rowser, *ata +rowser, Transport ,rgani1er are some of the tools accessible from this men!. Development $ontains tools that yo! !se for creating SAP applications. The tools that appear in the toolbar also appear in this men!. A+AP *ictionary, A+AP -ditor, B!nction +!ilder, $lass +!ilder, Screen Painter, and "en! Painter are some of the tools accessible from this men!

"est $ontains tools that let yo! test a completed program. )!ntime Analysis, S/0 Trace, *!mp Analysis, -%tended $hec , and the $omp!terAided Test Tool ($ATT) are some of the tools accessible from this men!. .tilities $ontains tools related to b!t not directly re'!ired by the development process. *oc!mentation "aintenance, S!pport Pac ages (SPA"), (pgrade (tilities, SAP /!ery, -nhancements (S",* and $",*) are some of the tools available in this men!. .ote4 In the SAP System, remember that the 6System7 and 6;elp7 men!s are always part of the "en! bar no matter where yo! navigate. A2AP 3or#bench "ools

,b>ect +rowser SE45 A+AP&? -ditor SE64 *ata *ictionary (**I$) SE77 B!nction +!ilder SE68 Screen Painter SE97 "en! Painter SE:7 Performance Trace S"59 )!ntime Analysis SE65 A+AP *eb!gger /h $lass b!ilder SE;:

Parallel Cursor
=R A!g 8E== J A+AP

ethod in ABAP 3

A program with the right f!nctionality and smartly written, b!t with poor performance will not satisfy the client re'!irements. +!siness programs !s!ally handle h!ge amo!nts of data. A+AP programs in SAP implementations are not an e%ception to this, and they need to give the !ser acceptable response times before they can be delivered to the client. Therefore, every developer sho!ld pay special attention to performance when b!ilding programs. Altho!gh too many times the development environment will not have an ade'!ate data vol!me (and nearly always not as in real prod!ctive systems), there is always a lot that can be done to deliver good programs from a performance standpoint. *atabase accesses are probably the first foc!s point2 wrong sentences searching records in tables may lead to e%tremely poor response times, and this needs to be ta en care of. ;owever, there is another important area to bear in mind, which is forgotten more often

that it co!ld be tho!ght4 data processing within the program. This white paper, oriented to developers and technical designers, will e%plain an ama1ing alternative way of processing data (applicable when handling together header and position records) that will give great response times, ma ing it possible to b!ild comple% programs that need to process big amo!nts of data in an acceptable time and achieving c!stomer satisfaction.

Parallel Cursor

ethod

Performance is a very important point in program b!ilding. A+AP incl!de, with each new version released, improved sentences for data base accessing, new inds of internal tablesS everything dedicated to get a better performance in the code b!ilt. There is a lot of investigation to be done as it is a comple% and e%tremely wide area. Altho!gh it is not always easy to have an ade'!ate development environment to carry o!t acceptable vol!me test (as in real prod!ctive systems) that wo!ld help identify performance iss!es in the programs, there are some tools in the SAP #or bench that can be !sed to optimi1e the programs that are going to be delivered, mainly foc!sed on database accessing. It is very important to analy1e the S/0 sentences to ens!re the ones being !sed are the right ones. SAP provides with two powerf!l tools, s!ch as the )!ntime analysis (S-GE) and the S/0 Trace (STET). They show how open S/0 statements are converted into native S/0 statements, meas!re database accesses and help to improve program performance. The correct !se of the B,) A00 -.T)I-S cla!se, the optimi1ation in the selection of fields on S-0-$T cla!se and in the #;-)- cla!se restriction, the !se of inde%es when accessing dataS These are some of the important points that have to be ta en into acco!nt. ;owever, the A+AP program will handle and process the data after it is retrieved from the database. This is an important area that sho!ld not be forgotten when optimi1ing programs performance. This will e%plains the parallel c!rsor method (P$"), a method that can be !sed to improve the programs performance in this second important point, when handling header and position records together. This is e%plained with a real life e%ample, comparing the res!lts obtained with two different versions of so!rce code, one with the traditional data handling and one applying the method. The white paper also gives technical instr!ctions to apply the method in the special case when the tables have a different ey.

Se!uential

ethod

5et the starting )!n time. 0oop the header internal table. Inside the master loop, item data will be looped and if any item data fo!nd, both the header and item data will be moved to another internal table. 5et the -nding )!n Time. The difference in -nd and Start r!n time is the act!al time ta en for se'!ential search.
SORT <Header Internal Table> BY <KEY Field> ASCENDING. SORT <Item Internal Table> BY <KEY Field> <KEY Field> ASCENDING.

CLEAR: <Header Work Area>. GET RUN TIME FIELD <Begin Time> LOOP AT <Header Internal Table> INTO <Header Work Area>. CLEAR: <Item Work Area>. LOOP AT <Item Internal Table> INTO <Item Work Area>. WHERE <KEY Field> EQ <Header KEY Field>. PROCESS the Header AND Item DATA. ENDLOOP. ENDLOOP. GET RUN TIME FIELD <End Time> Total TIME = End TIME Begin TIME.

Parallel

ethod

Sort the header and item internal table. 5et the starting )!n time. 0oop the header internal table. Inside the master loop, Item data will be looped by chec ing the inde%. If the ey field of item data is greater than the ey field of header data, then there is no item data is fo!nd and e%it from the detail loop. If item data is e'!al to the ey field of header data, move the header and item data to another internal table. Store the inde% of the item data. And contin!e the process. 5et the -nding )!n Time. The difference in -nd and Start r!n time is the act!al time ta en for Parallel $!rsor.
SORT <Header Internal Table> BY <KEY Field> ASCENDING. SORT <Item Internal Table> BY <KEY Field> <KEY Field> ASCENDING. CLEAR: <Header Work Area>. INITIALI E INDEX !ariable GET RUN TIME FIELD <Begin Time> LOOP AT <Item Internal Table> INTO <Item Work Area>. CLEAR: <Header Work Area>. LOOP AT <Header Internal Table> INTO <Item Work Area>. FROM <INDEX N"mber> IF <Item KEY Field> #reater Than <Header KEY Field> NO DATA $o"nd IN the item INTERNAL TABLE. EXIT. ELSE <Item KEY Field> E%"al TO <Header KEY Field> &tore the INDEX OF the item INTERNAL TABLE INTO a 'ariable. PROCESS the Header AND Item DATA. ENDIF. ENDLOOP. ENDLOOP. GET RUN TIME FIELD <End Time> Total TIME = End TIME Begin TIME.

ABAP " Introduction #or Beginners 6


T A!g 8E== J A+AP A2AP Stands for Advanced +!siness Application Programming. A+AP is a programming lang!age created and !sed by SAP for the development of application programs,incl!ding4 )eports, Screens, Interfaces C *ata conversions. All of SAP applications and even parts of its basis system were developed in A+AP. A+AP is an event driven programming lang!age.(ser actions and system events control the e%ec!tion of an application.

A2AP &vervie*
The Advanced +!siness Application Programming & ?50 (A+AP&?, commonly referred to as A+AP) is SAPHs proprietary lang!age. "ore than <EU of SAP )&G is developed !sing A+AP. The A+AP Program code is 6generated7 into +yte-code at the time of Activation of the program and is processed by the A+AP Processor which is part of the Fernel and +asis Services (a set of core programs developed in $) at the time of e%ec!tion. Any A+AP Program, beca!se it re'!ires the +ASIS mod!les, can r!n only within an SAP environment. "any feat!res of the programming lang!age and A+AP editor environment resemble the $,+,0 & I+" "ainframe environment altho!gh m!ch of it has been scaled down somewhat to give the lang!age a modern loo . The lang!age is case-insensitive and each statement terminates with a period. A+AP programs are event-driven to an e%tent tho!gh the event handling capabilities are not similar to f!ll-fledged ob>ect-oriented lang!ages s!ch as Iava or even 3is!al +asic. A+AP ob>ects or classes can be defined and implemented !sing the 6$lass +!ilder7 for !se in report and dialog programs.

$eporting
)eport programs prod!ce lists and can be classified as conventional reports and interactive reports. $onventional reports do not allow interaction by the !ser2 therefore2 the basic list contains e%tensive information that the !ser m!st often sort thro!gh to find the relevant data. Interactive reports allows for interaction (and drilldown) with the !ser2therefore the !ser can prod!ce secondary, detailed lists off of the basic list by choosing the relevant data and re'!esting more information. A03 )eports also allows interaction by the !ser, it can display large amo!nt of data at one short in the form of e%cel sheet.

Components o# ABAP Program

An A+AP program contains the following components4 Source code 4 containing the A+AP statements Screens 4 $onsist of the screen layo!t and associated flow logic. 9o! normally create the layo!t of a screen !sing the Screen Painter ;owever, there are special inds of screens, called selection screens and lists, whose layo!t and flow logic are designed e%cl!sively !sing A+AP statements. Interface 4 contains all of the entries in the men!s, the standard toolbar, the application toolbar, and f!nction ey settings. It contains titles and stat!ses. A stat!s is a collection of f!nction ey settings and men!s. Te%t elements4 are lang!age-specific. They can be translated either directly from the te%t element maintenance tool, or !sing a special translation tool. Documentation 4 is also lang!age-specific. Always write doc!mentation from the !serHs point of view. If yo! want to doc!ment the programming techni'!es yo! have !sed, !se comments in the program code instead.

<ariants 4 allow yo! to predefine the val!es of inp!t fields on the selection screen of a program.

Structure o# ABAP Program

A+AP is an event-driven programming lang!age, and as s!ch is s!ited to processing !ser dialogs. The so!rce code of an A+AP program consists of two parts4 Declarations4 *eclarations incl!de the statements for global data types and ob>ects, selection screens, and (in A+AP ,b>ects) local classes and interfaces within the program. Processing 2loc#s (indivisible program !nits) -ach processing bloc m!st be programmed as a single entity. There are two basic inds of processing bloc s4 Event 2loc#s4 -vent bloc s are introd!ced by an event eyword. They are not concl!ded e%plicitly, b!t end when the ne%t processing bloc starts. Dialog odules and Procedures4 *ialog mod!les and proced!res are introd!ced and concl!ded !sing eywords. The contents of all processing bloc s form the processing logic. #hen yo! generate the program, these parts are compiled to form the load version. This is interpreted at r!n time.

ABAP %erms to $emember

A Program is a series of str!ct!red A+AP statements. It co!ld be an -%ec!table program or a *ialog Program. A )eport is normally an A+AP Program which o!tp!ts a list. Some people refer to the 0ist as the )eport and to the A+AP report as a report program. A "od!le Pool is a non-e%ec!table program which contains 6mod!les7 that control dialog processing. A 0ist is an o!tp!t of an A+AP )eport program. There are Programs of other types s!ch as 6Incl!de7 (a non-e%ec!table bloc of code that can be incl!ded into a main program), S!bro!tine Pool (a pool of s!bro!tines or B,)"s which can be e%ec!ted from another e%ec!table bloc ), a f!nction pool which contains a gro!p of related f!nctions, and so on.

ABAP &ditor

The A+AP -ditor is !sed to create ,maintain, and e%ec!te A+AP programs. 9o! co!ld navigate to the A+AP -ditor thro!gh the SAP men! for A+AP #or bench or by typing in the transaction code S-G< in the command inp!t field. "ore details abo!t the feat!res of the A+AP editor is covered later. Some methods for e%ec!ting A+AP programs incl!de4 o The A+AP -ditor4 Tools -: A+AP #or bench -:A+AP -ditor (p!shb!tton) o The )eporting f!nction4 System-:Services-:)eporting A+AP programs that yo! create m!st start with a 697 or A 6O7 and can be !p to GE characters in length.

The editor combines a character based te%t entry capability with graphical icons and men! options to perform many of the f!nctions necessary to b!ild comple% A+AP applications.The A+AP development environment provides a wide variety of tools re'!ired by the programmer for developing and testing of applications. Pict!red above is the online deb!gging tool which enables the programmer to step into the program line by line. The online deb!gging tool provides the programmer with the

capability to designate watch variables. These variables once chosen can be viewed as their val!es change from statement to statement while the program e%ec!tes. The programmer can even change their val!es to sim!late different processing scenarios.

The A+AP program editor provides many f!nctions thro!gh the !se of graphical p!shb!ttons. Among these f!nctions are4

Toggle from display mode to edit mode Synta% chec Dwith limited a!to correction Activation Dactivates the program. -%ec!tion- -%ec!tes the program #here !sed list- to find the tables, statements, data elements !sed in the programs. Bind and repeat find. A+AP help.

ABAP Programming &'ecution

The individ!al processing bloc s are called in a predetermined se'!ence at r!ntime, regardless of the position in which they occ!r in the program. ,nce a processing bloc has been called, the statements within it are processed se'e!entially. Event bloc# If the system program or a !ser triggers an event for which the corresponding event bloc has been written in the processing logic, that event bloc is processed. The program flow is controlled either by the system or the !ser. odulari-ation unit #hen the system enco!nters a mod!lari1ation !nit call within a processing bloc , it calls the corresponding processing bloc . In this case, the program flow is controlled by the programmer. Assigning transaction codes To allow a mod!le pool to be e%ec!ted, yo! m!st assign a transaction code to it. 9o! can (b!t do not have to) assign a transaction code to an e%ec!table (type =) program.

Basic ABAP Program S(nta'

An A+AP program is comprised of a series of individ!al A+AP statements -ach statement m!st end with a period.( f!ll Dstop) Fey words are always the first word in a statement. #ords m!st be separated by at least one blan . A+AP statements can be indented and e%tend over several lines.

ABAP Program Structure

A+AP programs m!st start with either the P),5)A" or )-P,)T statement.

This statement is prod!ced a!tomatically when the program is created thro!gh the )epository +rowser. The )-P,)T statement is !sed for A+AP reports programs. The P),5)A" statement is !sed for general A+AP programs( for e%ample, mod!le pool programs).

All global data declarations m!st be gro!ped together at the beginning of the program in a declaration section. The statement section can consist of vario!s processing bloc s.This s!b>ect is dealt with in the remaining chapters of this co!rse. lways dhere to 1 * program naming standards dictated by the client%

Chaining Statements in ABAP

To avoid repeating ey words,A+AP allows yo! to 6chain7 statements together if these statements begin with the same ey word. The ey word is followed by a colon. -ach chained statement component is separated by a comma. +lan s can be inserted before and after the separators (which may be colons,commas or periods).

Comments

$omments are inserted into the program in two ways4


+y placing an asteris (K) in col!mn =,the complete line is designated as a comment line. +y placing a do!ble '!otation mar (6) within a line the remainder of the line is considered a comment.

ABAP Program Attributes

,ne way to create a new program is4


5o into the program men! from the A+AP -ditor4 Initial Screen. Select the $reate men! option or !se the $reate f!nction ey.

9o! can also create , maintain ,and e%ec!te programs from the )epository +rowser ( this is the recommended method for creating programs). The program attrib!tes m!st be maintained before proceeding. A+AP programs m!st be assigned to a development class or ,if applicable, identified as a local ,private ob>ect. (This is a re'!irement of SAPs $orrection and Transport System.) The application, class and type attrib!tes are !sed for the management of A+AP programs.

The application, title, stat!s and type attrib!tes are !sed for the management of A+AP programs. The application,title,stat!s and type attrib!tes are re'!ired. ,ther attrib!tes are optional re'!irements. B= and B? are help eys which allow yo! to search for the significance of the attrib!tes or a list of allowed inp!t val!es. The A+AP editorHs -%ec!te f!nctionis !sed to start an A+AP program directly from the editor. An A+AP mod!le pool program is e%ec!ted !sing transaction codes.

ABAP )b*ects + Pros and Cons 2


G A!g 8E== J A+AP A2AP &b=ects establishes a different level of data encaps!lation. In proced!ral programming the state of an application is held by global variables. In ob>ect-oriented programming, however, the state is ept inside separate classes and&or dynamically created ob>ects, and the distinction between p!blic and private components f!rther helps to separate what sho!ld be e%ternally visible from internal implementations. -ven witho!t in-depth ob>ect-oriented modeling, yo! can easily benefit from these feat!res in yo!r application programs #ith 1 * 5b6ects, yo! get m!ltiple instantiability for free. Together with A+AP ,b>ectHs a!tomatic garbage collection, this means that yo! as a developer neither have to deal with associating data and f!nctionality nor need to e%plicitly control the lifetime of yo!r ob>ects A+AP ,b>ects gives yo! the freedom to wor with (standalone) interfaces. This relieves yo! of the b!rden of nowing e%actly how certain f!nctionality is implemented. It also enables yo! to e%change an implementation later on witho!t the need for modifications in the code that !ses the interface A+AP ,b>ects ma es it easy to incorporate event-driven programming models. Thro!gh a 6p!blish and s!bscribe7 model, application components can be loosely co!pled. This allows greater fle%ibility than with the proced!ral approach, where the co!pling is m!ch tighter and the flow of program control is more predetermined.

A2AP &b=ects Pros

A+AP ,b>ects is more e%plicit and therefore simpler than classical A+AP. -%amples for pitfalls arising from implicit behavior in classical A+AP are the reali1ation of important interfaces via global data or the dependence of s!bmitted programs on events triggered by the r!ntime environment. In comparison, A+AP ,b>ects is based on a few basic and orthogonal concepts and is D therefore D more reliable and less error-prone A+AP ,b>ects has cleaner synta% and semantics r!les. $lassical A+AP is an evol!tionary-grown lang!age, containing obsolete statements and overlapping concepts. In A+AP ,b>ects, that is in classes and methods, many obsolete statements and additions are forbidden, many implicit synta% completions m!st be made e%plicit, and potentially incorrect handling of data is detected and obviated A+AP ,b>ects is the only way to !se new A+AP technology, s!ch as services for 5(I $ontrols, +SPs, or #eb *ynpro. Therefore, yo! will inevitably be confronted with A+AP ,b>ects when !sing these technologies. In s!ch cases, it is highly recommendable to switch to A+AP ,b>ects completely. Try to avoid a mi% of classical and ob>ect-oriented techni'!es within an application.

A2AP &b=ects Cons


In general, ob>ect oriented programming always means overhead, on the one hand in the implementation and on the other in the declaration of ob>ects. Performance ob>ects are normally always !sed to eep an ob>ect (eg. material). SAP is based on b!l processing. *!e to that, if yo! are processing =EEE materials, =EEE ob>ects need to be generated or yo! need to enhance the ob>ect with some wor aro!nd which might not be state of the art. Bact4 To eep data among more instances, it might become very tric y. At the time there are too less s illed and e%perienced reso!rces available, e.g. to maintain the code To search for b!gs in the code might be very challenging, inheritance ma es an effective b!g fi%ing almost impossible. The m!ch-la!ded maintenance decrease, comes only to its positive res!lt, if the b!gs have the same root ca!se. The reality shows that SAP is mostly effected by self-contained problems. The e%plicit higher programming effort does not effect a better res!lt. )e !sability is given by f!nction mod!les as well.

ABAP Programming ,anguage


8? I!l 8E== J A+AP

The A2AP Programming lang!age allows m!lti lang!age applications which allows S/0 Access so has been enhanced for !se with ob>ect oriented lang!age. ItHs especially created for dialog-based b!siness programs. A+AP Programming props !p type-specific processing of information, type conversions and type casting are s!pported. It also enables !sing translatable te%t elements, !sing which yo! are able to develop m!lti-lang!age programs. ,P-. S/0 standard is enabled from within A+AP which enables direct database accesses. A+AP ,b>ects is the ob>ectoriented enhancement from the A+AP programming lang!age. The A+AP synta% is platform-independent. #hich means that it has e%actly the same meaning or f!nction, regardless of the relational database system and operating-system for that application and presentation server.

A2AP Programming Synta$


Bor that A+AP Programming Synta%, Bollowing r!les apply.

A+AP programming is composed of individ!al lines. The very first word inside a statement is nown as an A+AP eyword. -ach statement finishes having a period. #ords sho!ld always be separated by a min!m!m of one space. $omments co!ld be indented as yo! want.

#ith ey phrases, additions and operands, the A+AP r!ntime system doesnHt differentiate between !pper and lowercase. 7ven though 1 * programming runtime system doesn8t differentiate between upper and lowercase, it is customary to create 'ey phrases as well as their additions in uppercase letters and operands in lowercase% #his type of representation may also be utili-ed in this program% )or indentations as well as for transforming uppercase9lowercase letters, you should use the *retty *rinter (the correspondingly labeled button within the 7ditor)%

-sing Comments in ABAP Programming


$omments can e%tend beyond one line. 9o! co!ld have several comments in one line (tho!gh this isnHt s!ggested). 0ines that start with asteris K within the first col!mn are

ac nowledged as comment lines thro!gh the A+AP r!ntime system and therefore are overloo ed. *o!ble '!otes mar s 7 indicate the rest of the lines are a comment.9o! are able to mi% consec!tive comments by having an identical beginning right into a chained statement4 #rite e%actly the same beginning area of the records then a colon. Bollowing the colon, list the finish areas of the comments (separated by commas). +lan spaces and line brea s are permitted before and after the separators. i.e. colons (2), commas (,), periods(.). 5bserve that this short form basically signifies a simplified type of syntax, and doesn8t present an improvement in performance% 5ut of the box otherwise the situation, the 1 * runtime system processes each one of the individual statements% 9o! will find other ways of moving towards the doc!mentation to have an A+AP Programming statement.The B= ey goes straight to the doc!mentation for that statement for which the c!rsor is highlighted. 9o! will find several editors at !se for A+AP programming, with respect to the release and s!pport pac age level. The option of editor is !ser-specific and it is prod!ced in the item .avigator. 0oo into the config!rations in !tilities. 9o! are choose the old editor or even the new editor.

A2AP Programming Development &b=ects


If yo! prod!ce a A+AP Programming development ob>ect, or change after which save it, the SAP first stores >!st one inactive version within the )epository. .e%t, yo! get an active version as well as an inactive version from the ob>ect. once yo! finish the development of the ob>ect, yo! need to activate the inactive version from the ob>ect. This version becomes the brand new active version from the ob>ect. 0ote that the re:uest has been released and hence the transport of the developed ob6ects to other systems are only possible if all ob6ects in the re:uest have been activated #henever yo! generate a development ob>ect, the machine prod!ces another r!ntime ob>ect (0,A* compilation) as well as stores it within the )epository. This compiled version is the one which is e%ec!ted at r!ntime. Try being an active participant in A+AP Programming for!m at S*. and very soon yo! will get to speed.

3hy do you need A2AP &b=ects>

A2AP &b=ects oriented programming lets yo! to be at par with the others as this is better methodology. To !nderstand the recent concept of A+AP ,s!ch as +API, +A*I, #,)FB0,# etc. Bor integration of A+AP with "icrosoft Technologies and IA3A as these are b!ild on ,,PS concept. To e%ploit the class reso!rces that has been provided by SAP.

3hat is A2AP &b=ects all about>


Class and ob*ects
The main ob>ective of 1 * 5b6ects is to model real world entity V -ach real world entity can be modeled by its characteristics and f!nctionality V The real world entity when modeled into ,,P world is nown as $lass, characteristics as attrib!tes and f!nctionality as methods. $lasses can be of two types =. 5lobal $lass4 5lobal $lasses can be accessed in any program. These classes can be accessed from anywhere and are stored in the class repository and this is created !sing S-8? and sho!ld start with O or 9. 8. 0ocal $lass4 0ocal $lasses are limited to the program in which they are defined. These classes can be accessed from the program in which they are created and it can have any namespace.

Class .eclaration in ABAP )b*ects


A $lass declaration wo!ld contain two parts. =) *efinition 8) Implementation
CLASS te(t DEFINITION. )CLASS DEFINITION IS done here* ENDCLASS. CLASS te(t IMPLEMENTATION. )METHOD IMPLEMENTATION IS done here* ENDCLASS.

The above statements wo!ld define a local class.

)b*ects in ABAP )b*ects


,b>ects are instance of a $lass or in other words they are r!n time entities. #e can create any n!mber of ob>ects for a class. $reating and accessing ,b>ects. *ata4 ob> type ref to test. $reate ob>ect ob>. #)IT- 4 ,+I-:ATT)I+(T-=.

(i.e. ob>ect name-:attrib!te name)

ABAP Procedural Programming .ra/backs


8< I!n 8E== J A+AP SAP has come a long way from A+AP Proced!ral Programming to ,b>ect ,riented A+AP Programming.

A2AP Procedural Programming Dra*bac#s


Program "aintenance is complicated *iffic!lty in program management as program si1e increases .o data ;iding 3ery diffic!lt to model real world entity 0ac of e%tensibility

%he Approach o# ABAP Procedural Programming


-mphasis on tas s 0arge programs are divided into smaller programs nown as f!nctions "ost of the f!nctions share global data *ata move openly aro!nd the system from f!nction to f!nction

%he Approach o# ABAP )b*ect )riented Programming


-mphasis on things that does those tas s Programs are divided into ob>ects *ata str!ct!res are designed s!ch that they characteri1ed the ob>ects B!nctions that operate on the data of an ob>ect are tied together in the data str!ct!re *ata can be hidden and cannot be accessed by e%ternal f!nctions .ew data and f!nctions can be easily added whenever necessary

0I1." ABAP 2e(/ord a .a(


8? "ay 8E== J A+AP Programs (I0D4 Searches for patterns.
FIND <+> IN ,&E-TI.N OFFSET <o$$> LENGTH <len> OF/ <te0t> ,IGNORING CASE1 RESPECTING CASE/ ,IN BYTE MODE1IN CHARACTER MODE/ ,MATCH OFFSET <2>/

,MATCH LENGTH <l>/.

The system searches the field Wte%t: for the pattern Wp:.

The S-$TI,. ,BBS-T Woff: 0-.5T; Wlen: ,B addition tells the system to search only from the Woff: position in the length Wlen:. I5.,)I.5 $AS- or )-SP-$TI.5 $AS- (defa!lt) specifies whether the search is to be case-sensitive. In (nicode programs, yo! m!st specify whether the statement is a character or byte operation, !sing the I. +9T- ",*- or I. $;A)A$T-) ",*- (defa!lt) additions. The "AT$; ,BBS-T and "AT$; 0-.5T; additions set the offset of the first occ!rrence and length of the search string in the fields Wp: and Wl:.

2se )I0D I0 # 1!7 for searching in the internal table%


DATA: 34er+db TYPE STRING VALUE 5E6758 re("lt4tab TYPE mat3h4re("lt4tab. FIELD-SYMBOLS <mat3h> LIKE LINE OF re("lt4tab. FIND ALL .--966EN-E& OF 34er+db IN :E67;B.INF. < 9no$$i3ial E67 =no>ledge Ba(e: RESULTS re("lt4tab. LOOP AT re("lt4tab ASSIGNING <mat3h>. WRITE: ? <mat3h><OFFSET8 <mat3h><LENGTH. ENDLOOP.

3isibilit( o# ))ABAP Components


== "ay 8E== J A+AP in ,,A+AP, -ach class component has a visibility. The whole class definition is separated into three visibility sections4

P(+0I$ 4 *ata declared in p!blic section can be accessed by the class itself, by its s!bclasses as well as by other !sers o!tside the class. P),T-$T-* 4 *ata declared in the protected section can be accessed by the class itself, and also by its s!bclasses b!t not by e%ternal !sers o!tside the class. P)I3AT-4 *ata declared in the private section can be accessed by the class only, b!t not by its s!bclasses and by e%ternal !sers o!tside the class.

CLASS <3la((4name> DEFINITION. PUBLIC SECTION: CLASS-METHODS :....

CLASS-DATA:... METHODS:.... DATA:.... PROTECTED SECTION: METHODS:.... DATA:.... PRIVATE SECTION: METHODS:.... DATA:.... ENDCLASS.

A,& I.)C %utorial #or ABAPers


G "ay 8E== J I*,$s The p!rpose of ALE ID&C is to help the A+AP *evelopers to get an idea on how to set!p all the necessary configs needed to send and receive idocs. This is the .S" g!ide for yo! if yo! are wondering where to start with the !7 ID5/ *evelopment and this pretty m!ch covers aro!nd all the re'!ired b!siness cases. All the below steps are e%plained in detail. =. (nderstanding and $onfig!ring client to client set!p4 #al s yo! thro!gh defining logical system, assign logical system to the client, create )B$ *estination and preparing distrib!tion model, generating partner profile, view partner profile created in the sender system, view port information in sender, how to distrib!te c!stomer distrib!tion model and generate partner profile in the receiving client and a sample e%ample of config!ring and distrib!ting material master across other systems. 8. System to system A0- set!p4 $reate 0ogical Systems for both sender and )eceiver, Assign 0ogical Systems to $lients, $reate )B$ *estination, "aintain $!stomer *istrib!tion "odel, 5enerate Partner Profile, *istrib!te $!stomer *istrib!tion "odel, 5enerating Partner Profile in the )eceiving 0ogical Systems, $reate &$hange "aterial master records, *istrib!ting )ecords in the )eceiving logical system, $hec ing I*oc stat!s in the receiver system and $hec "aterial in )eceiver System. G. Two way server to server comm!nication4 Practical e%amples to c!stomi1ing for Sending 3endor master from one client to another, additional c!stomi1ing re'!ired to send material master from one system to another and c!stomi1ing for receiving idocs from another system. ?. $overs other important topics on I*,$S4 T-)B$ )eporting, Setting !p A!dit )eporting, "an!ally Process I*oc in )eceiving System, $ollect I*oc and Transfer,$reating Bilter ,b>ects, Segment Biltering $reating )ed!ced message type, $hange Pointers Techni'!e, )eprocessing I*ocs not posted d!e to errors C Processing Idiocy waiting in the '!e!e.

T. *eveloping and Transmitting new I*oc4 Prepare data container in both sender and receiver, Prepare Segments(#-G=), Prepare I*ocs with the segments in both systems (#-GE), $reate new message type in both the systems (#-<=), 0in new message type with I*oc type in both systems (#-<8), "aintain two logical systems, one for senderanother for receiver in both the systems (+*T?) , Assign 0ogical System for )eceiver to appropriate client in )eceiver system and assign logical system for sender to appropriate client in sender system (S$$?) and $reate )B$ *estination for )eceiver in sender system and for sender in receiver system(S"TQ), $reate $!stomer *istrib!tion "odel for the "essage type in sender systems(+*@?), 5enerate the partner profile in the sender system(+*<8), *istrib!te the $*" from sender system to the reciver system(+*@?), $reate the o!tbo!nd program in sender system to pop!late and distrib!te the Idocs(S-G<) , *evelop Inbo!nd B!nction "od!le in the )eceiver System(S-GR), $reate new Idoc ,b>ect in +!siness ,b>ect )epository(S#,=) in )eceiver system, $reate a new tas based on Application Idoc ob>ect(PBT$) in )eceiver system, Allocate B!nction "od!le to the "essage type(#-TR) in )eceiver system, *efine settings for Inbo!nd B" in )eceiver system(+*T=), $reate .ew Process code for the Inbo!nd process(#-?8) in )eceiver system, Assign Inp!t "ethods(+*@R) in )eceiver System C 5enerate Partner Profile in )eceiver System(+*<8). @. Standard I*,$ -%tension4 +!ilding Append str!ct!re, ad>!sting e%its to pop!late data in the e%tended idoc str!ct!re, lin age with the message type and the basic idoc type in sender system, ad>!sting partner profiles, testing, writing code in the receiving system and chec ing if the data has been received corrrectly. R. $reating change doc!ments for the new information C $onfig!ring and developing for change pointers for a c!stom message type. <. *ownloading I*oc into Application Server4 $reating the file port, changing o!tbo!nd partner profiles, trigger the o!tbo!nd process.

Working /ith BA.I4s in SAP ABAP


=8 "ar 8E== J A+AP Programs +!siness addins are the enhancements to standard SAPHs version. They can be inserted to accommodate the b!siness re'!irements. ;ere are the steps in wor ing with a c!stom +A*I inside SAP. Defining 2ADI =. 5o to S-=< and create the +A*I definition. Provide appropriate description and the interface will be a!tomatically created. 8. *o!ble clic on the interface and create the re'!ired methods inside the methods tab

and add re'!ired parameters. G. Activate the +A*I *efinition. Implementing 2ADI =. 5o to S-=<, type in the +A*I which has already been defined either the one previo!sly created or the one which e%ists in the system. 8. $lic on "en!4 Implementation -: $reate and provide a implementation name. G. *o!ble clic on the method name and write the re'!ired code. ;ere is what is !s!ally happening where ever the +A*I is called inside the A+AP program.
-L4E@ITHAN;LE=>#ET4IN&TAN-E A EXPORTING e0it4name = 5<NABE .F BA;I>5 n"ll4in(tan3e4a33e+ted = 5@5 CHANGING in(tan3e = ore$4badi4in(tan3e C "Call to Methods defined in the badi definition ore$4badi4in(tan3e<>5<anD method name>5.

)b*ect )riented ABAP 5))ABAP6 + 0A7s 2


R I!l 8E=E J BA/s ;ere are some of the '!estions which yo! m!st now, when yo! say that yo! are good in ,b>ect ,riented Programming in SAP A+AP. =. 8. G. ?. T. @. R. <. Q. Priniples of oopsX #hat is difference between proced!ral C ,, ProgrammingX #hat is classX #hat is ob>ectX $an we instantiate a class within implementation of other classX #hat is deferred ey word X ;ow we can refer to a class witho!t defining itX $an we p!t non declarative statement e.g. STA)T-,B-S-0-$TI,. within a class #hat is static attrib!te C methodX

=E. ;ow to create a global class X ==. ;ow can we pass importing parameter X pass by val!e&pass by reference =G. $an we changed pass by reference in any method X =?. #hat is preferred parameter X more than one optional C no mandatory =T. can we pass ret!ring parameter by reference X ., only pass by val!e =@. can static method !se instance attrib!te X =R. $an a method call itselfX =<. #hat is me variableX

=Q. #hat is constr!ctor X#hat are type of constr!ctor X#hen it is called X 8E. $an we have e%port parameter in Instance constr!ctorX 8=. $an instance constr!ctor raise e%ception X 88. #hen static constr!ctor is calledX 8G. $an we have interface for static class or constr!ctorX 8?. #hat is abstract class X 8T. $an we implement abstract method in abstract class X if not then where it can be implementedX 8@. #hat is final class C "ethod X 8R. $an s!bclass call s!per class constr!ctorX 8<. $an we call static constr!ctor more than once in a programX 8Q. #hat is method redefinitionX GE. #hat is interface X G=. $an we implement interface in private section of any class X G8. Is it mandatory to implement all the methods of interface X GG. #hat is alias X Instead of specifying f!ll name of interface methods we can assign it a name which can directly trigger. G?. #hat is BriendshipX GT. #hat is event handler method X G@. $an we have more than one event handler method for same event X GR. $an event have import parameter X G<. ;ow yo! handled e%ception d!ring programmingX GQ. #hat is clean!p section X ?E. #hat is +A*IX ?=. #hat is chec bo% for m!ltiple !se in +A*IX ?8. ;ow to search a +A*I X ?G. #hat is 3al!e table and $hec table, *ifference between themX ??. #hat are secondary inde%HsX ?T. #hat is the draw bac of secondary inde%HsX ?@. #hat are conversion ro!tinesX ?R. At which level are they mantainedX ?<. what are Predeifined data typesX ?Q. #hich predefined data type !ses conversion ro!tinesX TE. #hat are logical !nits of wor X T=. #hen is difference btw native and open s'l T8. *ifference between "odify and (pdate TG. #hich is more efficient for all entries or >oinsX T?. #hen is implicit commit triggered. TT. #hat are )B$X T@. ;ow do ! create a destination systemX TR. #hat are different types of commits !sedX T<. #hat are search helpsX TQ. Types of tablesX @E. *ifference between pool tables and cl!ster tablesX @=. #hat is a delivery classX @8. #hat are the types of delivery classX

@G. *ifference between System tables and control tablesX @?. #hat is normali1ationX @T. #hat is +$.BX @@. #hat is persistant class

-nderstanding and Working /ith BAPI4s


@ I!l 8E=E J A+AP A +!siness Application Programming Interface is a precisely defined interface providing access process and data in +!siness Applications Systems S!ch as SAP. 3hat are the 2enefits of 2API

$an be !sed in diverse lang!ages & *evelopment -nvironments(A+AP, 3is!al +asic, Iava, $NN, etc.) $an be called from diverse platforms ($,", $,)+A, (ni%) )ed!ced development cost )ed!ced maintenance cost 6+est-of-both-worlds7 approach )ich f!nctionality of the )&G system (ser-specific front-ends

Steps involved in Creation of 2API?s =. 8. G. ?. T. @. *efining +API *ata str!ct!res in S-== Program a )B$ enabled +API f!nction mod!le for each method $reate a +!siness ob>ect for the +API in the +,) *oc!mentation of the +API 5enerate A0- interface for asynchrono!s +APIs 5enerate and release

.i##erence bet/een aster .ata8 %ransaction .ata and Customi9ing .ata


=< "ay 8E=E J SAP 5eneral

Customi-ing Data refers to the c!stomi1ed information for a partic!lar $lient. This incl!des data s!ch as payment terms, disco!nts, pricing, tolerance limits, etc., which yo! do not normally change on a day-to-day basis. "ransaction Data is the day-to-day recording of b!siness information s!ch as p!rchase orders, sales ret!rns, invoices, payments, collections, etc. This incl!des both systemgenerated data (ta%, disco!nt, etc., a!tomatically calc!lated by the system d!ring doc!ment posting) as well as !ser generated data. aster Data is the control information re'!ired to decide how transaction data gets posted into vario!s acco!nts (s!ch as c!stomers, vendors, 50, etc.). The master data is !s!ally shared across mod!les (for e%ample, c!stomer master records are common both to BI and S* in SAP) obviating the need for defining it in vario!s application areas. The master data remains in the system for fairly a long period.

Spool $e!uests
== Apr 8E=E J A+AP Spool )e'!ests are generated d!ring dialog!e or bac gro!nd processing and placed in the spool database with information abo!t the printer and print format. The act!al data is placed in the Tem Se (Temporary Se'!ential ob>ects).

Purpose o#

odi#ication Assistant

=E Apr 8E=E J A+AP The "odification Assistant is the tool that offers yo! s!pport when ma ing modifications to the standard, by branching to a special modification mode whenever yo! are modifying ob>ects from the standard in an A+AP wor bench editor. ,riginals are initially protected in this mode and can only be changed with the help of the additional p!shb!ttons that are placed at yo!r disposal. All changes that yo! ma e to the system are logged with the help of the "odification Assistant. This provides yo! with a detailed overview of modifications that is easy to read and that dramatically red!ces the amo!nt of effort needed to !pgrade yo!r system. The "odification Assistant offers s!pport in the following areas4

A+AP -ditor $lass +!ilder

Screen Painter "en! Painter Te%t -lement maintenance B!nction +!ilder A+AP *ictionary

If an ob>ect can be edited !sing the "odification Assistant, a dialog!e bo% appears the first time that yo! attempt to edit that ob>ect informing yo! that editing f!nctions are limited in modification mode. This dialog!e bo% appears e%actly once per !ser for each of the vario!s inds of transport ob>ects.

.i##erence bet/en Screen Painter and


Q Apr 8E=E J A+AP

enu Painter

Screen Painter is an A+AP #or bench tool !sed to create or modify the screens for yo!r transactions. The screen painter allows yo! to ma e modifications to screen attrib!tes, the flow control logic, or the layo!t. "en! Painter is a tool !sed to design the interface components. Stat!s, "en! +ars, "en! 0ists, B- ey settings, B!nctions, and Titles are the components of "en! Painter.

What is SAP Script: What are the componets in SAP Script:


< Apr 8E=E J SAP Scripts SAPscript is the SAP Systems own te%t-processing system which is !sed to generate doc!ments containing logos, tables and other ob>ects and which loo li e a pre-printed doc!ments. SAPscript is tightly integrated and !sed for many te%t-processing tas s. SAP Standard Styles and 0ayo!t Sets are always held in $lient EEE. 0ayo!t Sets are !sed for the Page 0ayo!t of SAPscript doc!ments. A layo!t set has the following elements4

;eader *ata4 *ata related to development (created by, development class, etc.) and the layo!t set information (which elements are !sed) are both stored in the header data. A start page m!st be entered here.

Paragraph Bormats4 Paragraph formats are re'!ired in layo!t sets. ;owever, they are also !sed for word processing in layo!t sets, for e%ample, to format te%t elements. $haracter Bormats4 9o! can also !se character formats to format te%ts or paragraphs. (nli e paragraph formats, however, they are !sed to format te%t within a paragraph. #indows4 #indows are names and window types, which are not physically positioned !ntil they are allocated to pages and !nits of meas!rement are specified. Pages4 Pages are defined to provide the system with a start and end point in te%t formatting. Page #indows4 Page windows are the combination of windows and pages, where the dimensions of a window and its position on a page are specified.

What is SAP 7uer( or ABAP 7uer(:


R Apr 8E=E J A+AP A+AP /!ery (also nown as an SAP /!ery or /!ery) is a powerf!l tool !sed to generate simple reports witho!t any coding. Typically, an A+AP '!ery is created first by defining a (ser 5ro!p and a B!nctional 5ro!p. The f!nctional gro!p can either be created with reference to a logical table or a database table. ,nce the f!nctional gro!p is defined, the !ser gro!p is assigned to the f!nctional gro!p. The last step is to create the '!ery on the f!nctional gro!p that is generated. An A+AP /!ery can be !sed to create the following three types of reports4

+asic 0ists4 )eports with basic formatting witho!t any calc!lated fields. Statistics4 )eports with statistical f!nctions s!ch as average, percentages, etc. )an ed 0ists4 )an ed lists are !sed for analytical p!rposes.

What is SAP .(npro


@ Apr 8E=E J A+AP *ynPro in SAP refers to *ynamic Programming relating to the screens and flow logic, which controls the processing and display of these screens. ,n a broader scale, a screen is also referred to as a *ynPro.

What is an $0C:
T Apr 8E=E J A+AP A )emote B!nction $all ()B$) is a call to a f!nction mod!le r!nning in a system different from the calling-system. The remote f!nction can also be called from within the same system (as a remote call), b!t !s!ally the calling-system and the called-system will be in different systems. An )B$ helps to ta e care of the following comm!nication4

$omm!nications between two independent SAP systems. $lient-server comm!nications between an e%ternal $lient and an SAP system acting as the server. $lient-server comm!nications between an SAP System acting as the $lient and an e%ternal server

What is B.C Programming in SAP:


G Apr 8E=E J A+AP +*$ (+atch *ata $onversion) is an a!tomated proced!re for transferring large vol!mes of e%ternal or legacy data into the SAP system !sing batch inp!t programming. There are three ways to do this4

$all Transaction "ethod Session "ethod *irect Inp!t "ethod

Irrespective of the method, the techni'!es !se the following steps4 o Identify the screens of the transaction that the program will process. o #rite a program to b!ild the +*$ table that will be !sed to s!bmit the data (i.e., te%t file) to SAP. o S!bmit the +*$ table to the system in the Lbatch modeH or as a Lsingle transactionH by the $A00 T)A.SA$TI,. command. The $all Transaction method cannot be !sed when yo! want to process m!ltiple transactions. Instead, !se the +*$-insert f!nction to achieve this

What are Internal %ables:


8 Apr 8E=E J A+AP Internal Tables are standard data type ob>ects which e%ist only d!ring the )!ntime of an A+AP program. They are !sed to perform table calc!lations on s!bsets of database tables and for re-organi1ing the contents of database tables according to a !serHs need. Internal tables f!lfill the need for arrays in A+AP. There are three types of internal tables4

Standard Tables with a LlinearH inde%. The ey is always Lnon-!ni'!e.H Sorted Tables with either a L!ni'!eH or Lnon-!ni'!eH ey. ;ashed Tables (they do not have a linear inde%) with the ey defined always as L!ni'!e.H

.i##erent t(pes o# ABAP Programs


= Apr 8E=E J A+AP There are nine types of A+AP Programs in SAP4

= -%ec!table Programs (A+AP )eports) I I.$0(*- Program " "od!le Pool&*ialog!e programs S S!b-)o!tine Pool I Interface Pool F $lass Pool T Type Pool B B!nction 5ro!p Y YS0T Program

Purpose o# .rilldo/n or interacti;e report


= Apr 8E=E J A+AP A *rill-*own )eport, also called an Interactive )eport, is a report with more detail. Imagine that yo! are loo ing at a +alance Sheet, presented as a drill-down report. The topmost list, also nown as the +asic 0ist, contains the top-level information s!ch as c!rrent assets, fi%ed assets, etc., !nder the gro!ping assets on one side of the +alance

Sheet. The drill-down f!nctionality helps yo! select a line item from the +asic 0ist (e.g., fi%ed assets) and drill-down f!rther to a detailed list (secondary list) which displays vario!s components of the fi%ed assets s!ch as land, b!ildings, machinery, etc. 9o! may drill-down even f!rther by do!ble clic ing the b!ilding line, which will bring !p the ne%t detailed list and so on. 9o! will be able to create a drill-down report with a ma%im!m drill level of 8E2 that is, incl!ding the +asic 0ist yo! will have a total of 8= levels in a single drill-down report.

ethods #or modi#(ing SAP Standard %ables


8@ "ar 8E=E J A+AP 9o! can modify SAP LStandard TablesH !sing4

Append Str!ct!res $!stomi1ing I.$0(*-S

Você também pode gostar