ABAP FAQ2

Embed Size (px)

Citation preview

  • 8/12/2019 ABAP FAQ2

    1/77

    - 1 -

    ABAP FAQs on Reports / Scripts / BDC / Dialogs

    ABAP Reporting

    SAP TERMINOLOGY

    Master data is a collection of information about a person or an object, e.g. a cost object, vendor, or G/Laccount. For example, a vendor master record contains not only general information such as the vendorsname and address, but also specific information, such as payment terms and delivery instructions. Generallyfor end users, master data is reference data that you will loo up and use, but not create or change.

    Transactional datais data related to a single business eventsuch as a purchase re!uisition or a re!uestfor payment. "hen you create a re!uisition, for example, #$% creates an electronic document for thatparticular transaction. #$% gives the transaction a document number and adds the document to thetransaction data that is already in the system. "henever you complete a transaction in #$%, that is, whenyou create, change, or print a document in #$%, this document number appears at the bottom of the screen.

    Workflo$ routing toolin #$% that forwards documents for review or approval. For example, a re!uisition that needsto be approved is sent to the appropriate approver&s inbox. "orflow is also used to route journal vouchers,

    credit card charges, and other documents in #$%.

    !ost O"#ect$$ 'ost (bject collects expenses and revenues for a particular purpose, such as a research project. )n #$%there are three types of cost objects* 'ost 'enter, )nternal (rder, and "+# "or +readown #tructure-lement see below for definition-.

    !ost !enter$General or operating Cost Objectsare nown in #$% as 'ost 'enters. 'ost 'enters are budgeted on thefiscal year%

    Internal Order$$ nonsponsored 'ost (bject for example, funding from the 0)1 %rovost- used to track costs over periodsother than fiscal years.)nternal (rders are often created to trac gifts or endowments at 0)1.

    WBS Ele&ent$ "+# lements are funded by outside sponsors and are used to trac costs of a particularresearch project over the entire span of its activity. 1hey may also be created to trac other sponsoredactivities, such as gifts.

    G'L Acco(nt$G/L accounts are also called 'ost lements in #$%. 1hey are a classification by expense or revenue type.)n the '( 'ontrolling- module of #$%, the term 'ost lement is used. )n the F)Financial- module, the term G/L $ccount is used. 1hese terms are used interchangeably for reporting,re!uisitions, and journal vouchers.

    )ata"ase ta"les and open S*L

    Add a single record to a database table

    insert into 2database table3 values 2wor area3

    Inserting all lines from an internal table into a database table

    insert 2database table3 from table 2internal table3

    !elete all records

    #elect 4 from 5mellemtab.delete 5mellemtab.

  • 8/12/2019 ABAP FAQ2

    2/77

    - 2 -

    endselect.

    !eleting records using records from an internal table

    delete employees from table itab.

    * + A

    BASIS LAYER

    W,at are t,e central interfaces of t,e R'- s.ste& / %resentation interface

    6atabase interface (perating system interface

    W,ic, interface controls ,at is s,on on t,e p%c% /

    - %resentation interface

    W,ic, interface con0erts S*L re1(ire&ents in t,e SAP de0elop&ent s.ste& to t,ose of t,edata"ase /

    - 6atabase interface

    W,at is SAP dispatc,er / #$% dispatcher is the control agent which manages the

    resources for the 7/8 applications.

    W,at are t,e f(nctions of dispatc,er / "#ual distribution of transaction load to the work processes $anagement of buffer areas in main memory )ntegration of the presentation levels

    (rgani5ation of communication activies

    W,at is a ork process / $ wor process is where individual dialog steps are actually processed and the wor is

    done. ach wor process handles one type of re!uest.

    Na&e 0ario(s ork processes of R'- s.ste& /9- 6ialog or (nline processes only one re!uest at a time -

    :- +acground started at a specified time - 8- ;pdate primary or secondary -

  • 8/12/2019 ABAP FAQ2

    3/77

    - 3 -

    #pool re!uests are generated during dialog or background processing and placed in the spooldatabase with information about the printer and print format. 1he actual data is placed in the 1em#e 1emporary #e!uential objects-.

    W,at are t,e different data"ase integrities /

    - #emantic integrity 7elational integrity

    3 %rimary ey integrity3 >alue set integrity3 Foreign ey integrity and (perational integrity.

    )ATA )I!TIONARY %

    T.pe of a ta"le or str(ct(re

    1he table type determines how the logical table description defined inthe $+$%/< 6ictionary is reproduced on the database.

    1here are the following table types*o transparent table

    o structureo append structure

    For internal purposes, such as storing control data or update texts,there are in addition the following table types*o pooled tableo cluster tableo generated view structure

    Transparent ta"le

    1here is a physical table on the database for each transparent table. 1henames of the physical tables and the logical table definition in the$+$%/< 6ictionary correspond.

    $ll business data and application data are stored in transparent tables.

    Str(ct(re

    ?o data records exist in the database for a structure. #tructures areused for the interface definition between programs or between screens andprograms.

    Append str(ct(re

    $n append structure defines a set of fields which belong to another tableor structure but which are treated in the correction administration asits own object.$ppend structures are used to support modifications.

    Pooled ta"le

    %ooled tables can be used to store control data e.g. screen se!uences,program parameters or temporary data-. #everal pooled tables can becombined to form a table pool. 1he table pool corresponds to a physicaltable on the database in which all the records of the allocated pooledtables are stored.

    !l(ster ta"le

  • 8/12/2019 ABAP FAQ2

    4/77

    - 4 -

    'luster tables contain continuous text, for example, documentation. #everal cluster tables can becombined to form a table cluster. #everal logical lines of different tables are combined to form a physicalrecord

    in this table type. 1his permits objectbyobject storage orobjectbyobject access. )n order to combine tables in clusters, at leastparts of the eys must agree. #everal cluster tables are stored in onecorresponding table on the database.

    Generated 0ie str(ct(re

    )n activation a structure is generated for a view. 1his structure serves as interface for the runtimeenvironment. )t does not generally appear in

    the $+$%/< 6ictionary.

    W,at is a )ata !lass/ 1he 6ata class determines in which tablespace the table is stored when it is created in the database.

    W,at is a Si4e !ategor./ 1he #i5e category describes the probable space re!uirement of the table

    in the database.

    5o Man. t.pes of si4e categories and data classes are t,ere/ 1here are five si5e categories @

  • 8/12/2019 ABAP FAQ2

    5/77

  • 8/12/2019 ABAP FAQ2

    6/77

    - 6 -

    W,at is t,e significance of )eli0er. !lass / 1he delivery class controls the degree to which the #$% or the customer is responsible for tablemaintenance whether #$% provides the table with or without contents. determines the table type. determines how the table behaves when it is first installed, at upgrade, when it is transported,and when a client copy is performed.

    W,at is t,e &a6i&(& n(&"er of str(ct(res t,at can "e incl(ded in a ta"le or str(ct(re ?ine.

    W,at are t,e to &et,ods of &odif.ing Sap standard ta"les / $ppend #tructures and 'ustomi5ing )ncludes.

    W,at is t,e difference "eteen a S("str(ct(re and an Append Str(ct(re / )n case of a substructure, the reference originates in the table itself, in the forma of a statement.include... .

    - )n case of an append structure, the table itself remains unchanged and the refrence originates

    in the append structure.

    W,at are t,e to a.s for restricting t,e 0al(e range for a do&ain / +y specifying fixed values. +y stipulating a value table.

    W,at is a Matc, !ode /0atch 'ode is a tool to help us to search for data records in the system. 0atch codes are an efficient anduserfriendly search aid where ey of a record is unnown.

    W,at are t,e to le0els in defining a Matc, !ode / 0atch 'ode object 0atch 'ode )d.

    W,at is t,e &a6i&(& n(&"er of &atc, code Id:s t,at can "e defined for one Matc, code o"#ect / 8I. $ match code )d is a one character )6 which can be a letter or a number.

    !an e define o(r on Matc, !ode I):s for SAP Matc,codes /Ces, the numbers @ to J are reserved for us to create our own 0atch 'ode )6s for a #$% defined0atchcode object.

    W,at is an 2pdate t.pe it, reference to a Matc, code I)/)f the data in one of the base tables of a matchcode )6 changes, the matchcode data has to be updated. 1heupdate type stipulates when the matchcode is to be updated and how it is to be done. 1he update type alsospecifies which method is to be used for +uilding matchcodes . Cou must specify the update type when youdefine a matchcode )6.

    W,at are con0ersion ro(tines /

    - ?on standard conversions from display format to sap internal format and viceversa areimplemented with so called conversion routines.

    Aggregated O"#ects>iews, matchcodes, and loc objects are also called aggregate objects because they are formed fromseveral related tables.

    W,at is a ;ie /

  • 8/12/2019 ABAP FAQ2

    7/77

    - 7 -

    $ view is a logical view on one or more tables. $ view on one or more tables i.e, the data from a viewis not actually physically stored instead being derived from one or more tables. $ view can be used tosummari5e data which is distributed among several tables

    5o &an. t.pes of ;ies are t,ere /

    - )ata"ase ;ie 8SE

  • 8/12/2019 ABAP FAQ2

    8/77

    - 8 -

    "hen activating this loc object, two function modules+ with the names ?D;;K2(bjectKname3 and6D;;K2(bjectKname3 are generated.

    E6a&ple $

    +roblem

    Cou wish to prevent a user from being able to change the name of a course or the name of the professorwith responsibility for the course at a time when another user is editing the course description whichcontains this information-.

    )olution

    1he problem described above can be solved by defining a loc object K;B;7#. 1his is done by definingprimary and secondary tables in the loc object. 1able ;B;7# is chec table of table ;B7#+, so ;B;7#should be selected as primary table and ;B7#+ as secondary table of the loc object.1he Lock arg(&entin this case is the field combination F$+?7, B7#?7, and #%7$# i.e %rimary Bey'ombination-.1he Loc mode #hared is to be selected here. 1his allows several users to access the data

    simultaneously in display mode.1he loc mode in the generated function modules for setting ?D;;KK;B;7#- and releasing6D;;KK;B;7#- locs is therefore set to shared as default, but can be overridden by calling thefunction modules.

    )f the function module ?D;;KK;B;7# is called with F$+?7 &9& and B7#?7 &8&, the record forcourse 8 in faculty 9 is loced in table ;B;7#. Furthermore, all the course descriptions for this course areloced in table ;B7#+ since field #%7$# was not specified when the function module was called. )n suchcases, the loc is made generically for a field which is not defined.)f the function module 6D;;KK;B;7# is now called with F$+?7 &9&, B7#?7 &8& and #%7$# &6&, the German course description is unloced. $ll other course descriptions remain loced.

    W,at is data"ase (tilit. /

    - 6atabase utility is the interface between the $+$%/< 6ictionary and the underlying the #$%

    system.

    1he database utility is the interface between the $+$%/< 6ictionary and the relational database underlyingthe #$% system. Cou can call the database utility from the initial screen of the $+$%/< 6ictionary with;tilities M 6atabase utility.1he database utility allows you to create, delete and convert objects from the $+$%/< 6ictionary in thedatabase.

    MO)2LARI>ATION

    W,at is Mod(lari4ation and its "enefits/)f the program contains the same or similar blocs of statements or it is re!uired to process the samefunction several times, we can avoid redundancy by using modulari5ation techni!ues. +y modulari5ing the$+$%/< programs we mae them easy to read and improve their structure. 0odulari5ed programs are alsoeasier to maintain and to update.

    5o can e create calla"le &od(les of progra& code it,in one ABAP'7 Progra&/$. +y defining macros.+. +y creating include programs in the library.

    W,at are s("ro(tines/#ubroutines are program modules which can be called from other $+$%/< programs or within the sameprogram.

  • 8/12/2019 ABAP FAQ2

    9/77

    - 9 -

    W,at are t,e t.pes of S("ro(tines/

    $. )nternal #ubroutines* 1he source code of the internal subroutines will be in the same $+$%/)"#.

    W,at are t,e ad0antages of Logical )ataBases /

    )t offers an easytouse selection screen. Cou can modify thepregenerated selection screen to your needs. )t offers chec functions to

    chec whether user input is complete, correct, and plausible.)t offers reasonable data selections.

    )t contains central authori5ation checs fordatabase accesses. nhancements such as improved performance immediately apply to allreport programs that use the logical database.

    Report @ORMATTING

    In order to s(ppress t,e leading 4eros of a n(&"er field t,e ke.ords (sed are $?(O7(.

    T,e !o&&and t,at allos for 0ertical align&ent of fields one "elo t,e ot,er%;?67.

    In order to concatenate strings onl. for o(tp(t p(rposes t,e co&&and ????????? can "e (sed incon#(nction it, t,e :Write: state&ent%?(G$%.

    )ata can "e &o0ed fro& one field to anot,er (sing a :Write$: State&ent and stored in t,e desiredfor&at%17;. "rite * 6ateK9 to 6ateK: format 66/00/CC.

    In order to ,a0e "oldfaced te6t as o(tp(t t,e co&&and (sed is"rite * 2f3 )?1?#)F)6.

  • 8/12/2019 ABAP FAQ2

    11/77

  • 8/12/2019 ABAP FAQ2

    12/77

    - 12 -

    1he event eyword $1 #L'1)(?#'7? provides you with several possibilities to carry out processingblocs while the system is processing the selection screen.

    START3O@3SELE!TION %oint after processing the selection screen

    1he event #1$71(F#L'1)(? gives you the possibility of creating a processing bloc after processing

    the selection screen and before accessing database tables using a logical database. Cou can use thisprocessing bloc, for example, to set the values of internal fields or to write informational statements ontothe output screen.

    $t the #1$71(F#L'1)(? event, also all statements are processed that are not attached to an eventeyword except those that are written behind a F(70?6F(70 bloc

    GETta"leC %oint at which the logical databaseoffers a line of the database table 2table3.

    1he most important event for report programs with an attached logical database is the moment at which thelogical database program has read a line from a database table see $ccessing 6ata ;sing Logical6atabases -. 1o start a processing bloc at this event, use the G1 statement as follows*

    #yntax

    G1 2table3 PF)L6# 2list3Q.$fter this statement, you can wor with the current line of the database table 2table3. 1he data is provided inthe table wor area 2table3.

    GET ta"leC LATE %oint after processing all tables whichare hierarchically subordinate to the database table2table3 in the structure of the logical database.

    1o start a processing bloc at the moment after the system has processed all database tables of a logicaldatabase that are hierarchically inferior to a specific database table, use the event eyword G1 as follows*

    #yntaxG1 2table3 L$1 PF)L6# 2list3Q.

    )n analogy to report programs that use only #L'1 statements see table in 'omparison of $ccess0ethods -, the processing bloc of a G1 2table3 L$1 statement would appear directly before the?6#L'1 statement in the #L'1 loop for the database table 2table3.

    EN)3O@3SELE!TION %oint after processing all lines offeredby the logical database.

    1o define a processing bloc after the system has read and processed all database tables of a logicaldatabase, use the eyword ?6(F#L'1)(?.

    1he following events occur during the processing of the output list of a report program*vent eyword vent

    TOP3O@3PAGE %oint during list processing whena new page is started

    EN)3O@3PAGE %oint during list processing when a pageis ended

    1he following events occur during the display of the output list of a report program*vent eyword vent

    AT LINE3SELE!TION %oint at which the user selects a line

  • 8/12/2019 ABAP FAQ2

    13/77

    - 13 -

    AT 2SER3!OMMAN) %oint at which the user presses afunction ey or enters a command in thecommand field.

    AT P@nnC %oint at which the user presses thefunction ey with the function code %F2n3

    "ith the selection screen, $+$%/< offers an interactive element also for report programs. Cou can define aselection screen without having to bother about all the details re!uired in dialog programming.1he selection screen is always processed directly after a report program is started. 1he user can enter fieldvalues and selection criteria on this screen.

    1he main purpose of the selection screen is to enable the user to control the database selections of thereport program. )f a report program is started from another $+$%/< program with the #;+0)1 statementsee 'alling 7eports-, the selection screen objects also serve as a data interface,"ith a selection screen defined in the report program, you can enable the user to

    R assign values to variables with the %$7$017# statementR determine selection criteria with the #L'1(%1)(?# statement

    5o do .o( read selected lines of data"ase ta"le into an internal ta"le in packages of predefinedsi4e%

    #L'1 4 F7(0 2#%FL)3 )?1( 1$+L 2)1$+3 PA!DAGE SI>E NC% where &n: is variable.

    ?ame the WIL)!AR) characters which are used for comparisions with c,aracter strings S n(&ericstrings%

    &T& and &K&.

    5o to specif. a client for data"ase ta"le processing% 1$+L# #%FL).

    #L'1 4 F7(0 #%FL) 'L)?1 #%')F)6 "A7 0$?61 +1"? &@@9& $?6 &@@8&.

    ...?6#L'1.

    Acti0ationN 6uring activation, the runtime object of aggregate object or tables is created. 1he runtimeobject is buffered so that the application program can access it !uicly. 7untime object has informationabout the following objects of table

    domain N data elements N field definition N table definition

    Lock Mec,anis&N prevents a new database operation being started an existing one has been correctlycompleted. "hen conversion is done, loc is created automatically and released only when conversionis successful.

    'learing of locs

    restart adjustment N attempt is made to continue conversion at the point of termination'ancel adjustment N loc entry is simply deleted from table

    ;ersion Manage&ent f(nctions

    - 'anceling changes N reset revised version to active version- #toring changes N active version will be temporarily stored in version#witching changes N switch between active and revised versions

    Version catalogN list of all existing versions of an object- 7evised version N produced when we edit an existing object

  • 8/12/2019 ABAP FAQ2

    14/77

    - 14 -

    - $ctive version N produced when we activate an object- 1emporary version N produced when we copy the active version temporarily to the database with store

    version functions

    - Aistorical versions N created when 9. 'orrection is created : correction isreleased

    Ta"le B(ffering $ Possi"le "(ffering t.pes- full buffering N either, whole table or none of the table is located in the buffer 1ables up to 8@ b done

    in client dependent fully buffered tables-

    - Generic buffering N generic areas of the table are fully buffered.

    - Generic ey N left justified section of primary ey of a table.

    - generic area N all records for which fields of generic ey correspond

    - #ingle record buffering N records actually being accessed are loaded to buffers, large records wherefew records are accessed.

    Internal Ta"les / T.pes /

    STAN)AR) ta"le

    Bey access to a standard table uses a linear search. 1his means that the time re!uired for a search is in

    linear relation to the number of table entries.

    Cou should use index operations to access standard tables.

    SORTE) ta"le

    6efines the table as one that is always saved correctly sorted.

    Bey access to a sorted table uses a binary ey. )f the ey is not uni!ue, the system taes the entry with thelowest index. 1he runtime re!uired for ey access is logarithmically related to the number of table entries.

    5AS5E) ta"le

    6efines the table as one that is managed with an internal hash procedure

    Cou can only access a hashed table using the generic ey operations or other generic operations #(71,L((%, and so on-. xplicit or implicit index operations such as L((% ... F7(0 oe )?#71 itab within aL((%- are not allowed.

    IN)EF ta"le

    $ table that can be accessed using an index.

    )ndex table is only used to specify the type of generic parameters in a F(70 or F;?'1)(?. 1hat meansthat you can&t create a table of type )?6.

    #tandard tables and sorted tables are index tables.

    S.nta6 $6$1$ itab 1C% table type of line type P")1A ;?)D;/?(?;?)D; BC 2ey3Q P)initial si5e nQ P")1AA$67 L)?Q

    W,at are )ATA !L2STERS /Cou can group any complex internal data objects of an $+$%/< program together in data clusters and storethem temporarily in $+$%/< memory or for longer periods in databases. Cou can store data clusters inspecial databases of the $+$%/< 6ictionary. 1hese databases are nown as $+$%/< cluster databases andhave a predefined structure.#toring a data cluster is specific to $+$%/

  • 8/12/2019 ABAP FAQ2

    15/77

    - 15 -

    cluster databases using #DL statements, only $+$%/< statements are able to decode the structure of thestored data cluster.

    )escri"e t,e f(nctions of t,e de"(gger screen%

    - Single step8@=9 ;se this option to step through the program state&ent ". state&ent. 1his allowsyou to branch into subroutines and function modules, and to execute these routines step by step aswell. (nce a subroutine or function module has been processed, control returns to the statement

    following the '$LL F;?'1)(? or %7F(70 statement.- E6ec(te8@93;se this option to process a program line ". line. $ll of the statements on the current line

    are processed in a single step. )f you are positioned on a line that calls a subroutine and you choose"xecute, the 6ebugger processes the whole subroutine and then moves on to the line following thesubroutine call. 1his allows you to jump through the statements within the subroutine.

    - Ret(rn8@H9 1he 6ebugger ret(rnsfrom a routine to the point at which control returns to the mainprogram. ;se this option to return from a subroutine, function module, or called program to the callingprogram.

    - !ontin(e8@93;se this option to process the program up to the next dynamic or static breapoint or upto the cursor position. )f there are no more breapoints in the program and no cursor has been set, thesystem exits debugging mode and executes the rest of the program normally.

    Ta"les 6isplay the contents of internal tables.

    Pro"le&$5o to r(n a progra& in "ackgro(nd/

    #olution *xecute the 7eport )n the selection screen *$fter filling the screen fields press FJ.$ screen appears re!uesting ; to print the +acground %arameters4nter the output deviceg A%LU /#$%: etc-4)n the spool options ;nchec %rint immedietly,;nchec delete after output,and new spool re!uest.%ress enter.$nother screen appears with heading start time .; can press start immly ,then save?ow the +acground job is scheduled for the given program .

    1o >iew the status of bacground Uob,1he transaction code is #08V.xecute from the resulting screen .Uob overview 3From the Uob list select ;r program and select

    #pool from the application toolbar(utput 'ontroller *List of #pool 7e!uests#elect ;r #pool re!uestand clic 6isplay icon from the overview screen .; will be displayed with the List.'aution *#ee to that the list with does not exceed :== columns ,)f it exceeds the extra columns will be

    truncated in +acground

    W,at are presentation and application ser0ers in SAP/

    $ presentation server is actually a program named #apgui.exe. )t is usually installed on a usersworstation.

    Application serveris a set of executables that collectively interpret the $+$%/< programs and managethe input S output for them.

    In an ABAP'7 progra& ,o do .o( access data t,at e6ists on a presentation ser0er 0's on anapplication ser0er/

    For presentation server use ;%L($6 or "#K;%L($6 function modules.

    For application server use (%? 6$1$#1, 7$6 6$1$#1 and 'L(# 6$1$#1 commands.

    )escri"e t,e s.nta6 and f(nction of t,e A2T5ORITY !5E!D co&&and/$ns * $;1A(7)1C N 'A'B (+U'1 2object name3 )6 2name93 F)L6 2f93 )6 2name:3 F)L6 2f:3 W )F #C#;+7' ? @.

  • 8/12/2019 ABAP FAQ2

    16/77

    - 16 -

    0he A203O,I045C3"C6 checks whether a user has the appropriate authori7ation to execute a particularactivity.

    E6plain t,e EFPORT and IMPORT co&&ands/ 5o can .o( pass &ore t,an one gro(p of data ".(sing IMPORT co&&ands/

    EFPORT $31o read data objects from an $+$% program into $+$% memory, use the following statement*#yntax%(71 2f93 PF7(0 2g 93Q 2f :3 PF7(0 2g :3Q ... 1( 00(7C )6 2ey3.

    1his statement stores the data objects specified in the list as a cluster in memory. )f you do not use theoption F7(0 2f i 3, the data object 2f i 3 is saved under its own name. )f you use the F7(0 2g i 3 option,the data objet 2g i 3 is saved under the name 2f i 3. 1he name 2ey3 identifies the cluster in memory. )t maybe up to 8: characters long.1he %(71 statement always completely overwrites the contents of any existing data cluster with thesame name 2ey3.

    IMPORT $31o read data objects from $+$% memory into an $+$% program, use the following statement*#yntax

    )0%(71 2f93 P1( 2g 93Q 2f :3 P1( 2g :3Q ... F7(0 00(7C )6 2ey3.

    1his statement reads the data objects specified in the list from a cluster in memory. )f you do not use the 1(2g i 3 option, the data object 2f i 3 in memory is assigned to the data object in the program with the samename. )f you do use the option, the data object 2f i 3 is read from memory into the field 2g i 3. 1he name2ey3 identifies the cluster in memory. )t may be up to 8: characters long.Cou do not have to read all of the objects stored under a particular name 2ey3. Cou can restrict the numberof objects by specifying their names. )f the memory does not contain any objects under the name 2ey3, #C#;+7' is set to

  • 8/12/2019 ABAP FAQ2

    17/77

    - 17 -

    W,at are t,e differences "eteen t,e para&eter SET and GET/SET%$7$017 )6 2pid3 F)L6 2f3.1his statement saves the contents of field 2f3 under the )6 2pid3 in the #$% memory. 1he code 2pid3 canbe up to :@ characters long. )f there was already a value stored under 2pid3, this statement overwrites it. )fthe )6 2pid3 does not exist, doubleclic 2pid3 in the $+$% ditor to create a new parameter object.GET%$7$017 )6 2pid3 F)L6 2f3.1his statement fills the value stored under the )6 2pid3 into the variable 2f3. )f the system does not find a

    value for 2pid3 in the #$% memory, it sets #C#;+7' to

  • 8/12/2019 ABAP FAQ2

    18/77

    - 18 -

    Mo0e* 1o assign the value of a data object 2f93 to a variable 2f:3, use the following statement*0(> 2f93 1( 2f:3.or the e!uivalent statement2f:3 2f93.1he contents of 2f93 remain unchanged. 2f93 does not have to be a variable it can also be a literal, a textsymbol, or a constant. Cou must always specify decimal points with a period .-, regardless of the userspersonal settings.

    0ultiple value assignments in the form2f

  • 8/12/2019 ABAP FAQ2

    19/77

    - 19 -

    5o ill .o( create a file on application ser0er

    (pen dataset 2dsn3 for output.

    ABAP'7 state&ent for opening a file on application ser0er for reading ???????????%

    (pen dataset 2dsn3 for input.

    5o ill .o( transfer data into a file in application ser0er / 6ata fnameI@- value &mCF)L&.

    6ata num type i.(pen dataset fname for output.6o 9@ times. ?um ?um Z 9. 1ransfer num to fname.nddo.

    .....etc.

    Na&e t,e f(nction &od(les to rite data fro& an Internal Ta"le to t,e Presentation Ser0er%6("?L($6 and "#K6("?L($6.

    Na&e t,e f(nction &od(les to read data fro& Presentation Ser0er into an Internal Ta"le%

    ;%L($6 and "#K;%L($6.

    Na&e t,e f(nction &od(le t,at can "e (sed to gi0e infor&ation a"o(t files on Presentation Ser0erand a"o(t it:s Operating S.ste&%"#KD;7C.

    Na&e t,e ABAP'7 ke. ord for seac,ing a string in an Internal Ta"le%#$7'A 2itab3 F(7 2str3 2options3.

    5o o(ld .o( find t,e attri"(tes of a data t.pe or data o"#ect /6#'7)+ F)L6 2f3 PL?G1A 2l3Q P1C% 2t3 P'(0%(??1# 2n3QQ P(;1%;1L?G1A 2o3Q P6')0$L# 2d3Q P6)1 0$#B 2m3Q.

    W,ic, f(nction &od(le o(ld .o( (se to c,eck t,e (ser:s a(t,ori4ation to access files "eforeopening a file/$;1A(7)1CK'A'BK6$1$#1

    Na&e t,e f(nction &od(le (sed to con0ert logical file na&es to p,.sical file na&es in ABAP'7progra&s%F)LKG1K?$0.

    W,at does !5AIN %%%%EN) !5AIN do/#ometimes you want to chec several fields as a group. 1o do this, include the fields in a F)L6 statement,and enclose everything in a 'A$)??6'A$)? bloc.

    "xample

    4444 #creen flow logic* 4444'A$)?.

    F)L6* #%FL)'$77)6, #%FL)'(??)6. 0(6;L 'A'BKFL)GA1.?6'A$)?.

    "hen an error is found inside a chain, the screen is redisplayed, and all fields found anywhere in the chainare inputenabled. $ll nonchain fields remain disabled.

    W,at does an e6tract state&ent do in t,e ABAP progra&/

  • 8/12/2019 ABAP FAQ2

    20/77

    - 20 -

    Fills the fields groups with values.

    W,at ,appens ,en a ta"le is acti0ated in ))/$ table definition is generated 0ap to the database systemFor each table, a table of the same name with the same fields and

    corresponding data type is created in database. N %rimary index isgenerated automatically

    W,at is a c,eck ta"le and ,at is a 0al(e ta"le/

    - "hen we define a foreign ey in a table $-. )f this ey refers to primary ey of another table +-. 1able+ is chec table

    Fields referring to a domain may assume values contained in thecorresponding fields of the value table. Field referring to the domainshould have a foreign ey

    W,at is !TS and W,at do .o( kno a"o(t it/ !TS is !orrection and Transport S.ste&s

    - 'orrection system manages the internal system components lie objects lie only original version of theobject exists. )t stores all changes made to the object.

    - 1ransport system allows to transports the object from on #$% system to another 6evelopment systemto %roduction system-. )t allows to over write or delete existing object in target system and import new

    objects to target systems. 6uring development wor we start by opening a tas correction- to

    which we can assign new and changed objects. (nce changes havebeen made, transport new or changed objects to other #$% system bymeans of transport 'hange- re!uest.

    5a0e .o( (sed SAP s(pplied progra&s to load &aster data/

    - #$% supplied +6' programs N 70@I++)@ %urchase re!uisitions-- 706$1)?6 0aterial master- 7F+)B7@@ >endor 0asters- 7F+)6@@ 'ustomer 0aster- 7>)?>+@@ #ales (rder-

    W,at are t,e Tec,ni1(es in0ol0ed in (sing SAP s(pplied progra&s/ )o .o( prefer to rite .o(ron progra&s to load &aster data/ W,./

    -)dentify relevant fields

    - 0aintain transfer structure %redefined N first one is always session record-

    - #ession record structure , Aeader 6ata, )tem #1C% N record type -

    - Fields in session structure N #1C%, G7(;% , 0$?61, ;#7?$0 , ?( 6$1$

    - Fields in header structure N consists of transaction code also N #1C%, +00@@, 1'(6,0$1?7 andFields in )tem )10# W

    - 0aintain transfer file N sample data set creation

    5o do .o( set (p "ackgro(nd #o"s in SAP/ W,at are t,e steps/ W,at are e0ents dri0en "atc,#o"s/

    - 'reate a job using function module U(+(%?

    - 'ollect the job specifications.

    - $dd a job step to the job with the function module U(+#;+0)1.

    - 'lose the job and pass it to +acground processing system for execution with the function module U(+'L(#

    - >?1 67)>? +$1'A U(+# *- 1ypes #ystem events N triggered when activation of new operation mode taes place

    - ;ser events 1riggered from $+$%/< or external program.

    - 1riggering an event notifies the bacground processing that named condition has been reached. 1he+acground system reacts by starting any jobs that were waiting for the event.

    1ransaction codes related to bacground jobs creation and processing are *#08IUob creation-

  • 8/12/2019 ABAP FAQ2

    21/77

    - 21 -

    #08VUob selection and execution-.

    W,at are presentation and application ser0ers in SAP/$ presentation server is actually a program named #apgui.exe. )t is usually installed on a usersworstation. $pplication server is a set of executables that collectively interpret the $+$%/< programs and manage theinput S output for them.

    In an ABAP'7 progra& ,o do .o( access data t,at e6ists on a presentation ser0er 0's on anapplication ser0er/

    - For presentation server use ;%L($6 or "#K;%L($6 function modules.For application server use (%? 6$1$#1, 7$6 6$1$#1 and 'L(# 6$1$#1 commands.

    W,at is t,e difference "eteen S.nc,rono(s and As.nc,rono(s (pdates / $ program ass the system to perform a certain tas, and then either waits or doesn&t wait for the

    tas to finish. )n synchronous processing, the program waits* control returns to the program onlywhen the tas has been completed. )n asynchronous processing, the program does not wait* thesystem returns control after merely logging the re!uest for execution.

    Transferring SPA'GPA Para&eters to Transactions1o fill the input fields of a called transaction with data from the calling program, you can use the #%$/G%$techni!ue. #%$/G%$ parameters are values that the system stores in the global, userrelated #$% memory.Cou use the #$% memory to transfer values between programs beyond the borders of transactions. $ usercan access the values stored in the #$% memory during one terminal session for all modes used in parallel.

    To fill an SPA/GPA parameter, use:#yntax#1 %$7$017 )6 2pid3 F)L6 2f3.

    To read an SPA/GPA parameter into an ABAP program, use:#yntaxG1 %$7$017 )6 2pid3 F)L6 2f3.

    W,at is t,e difference "eteen !o&&it3Work and Roll"ack3Work tasks /3 !o&&it3Work statement [performs\ many functions relevant to synchroni5ed execution of tass.

    7ollbac"or statement [cancels\ all re!uests relevant to synchroni5ed execution of tass.

    W,at are t,e different data"ase integrities /

    - #emantic integrity 7elational integrity3 %rimary ey integrity3 >alue set integrity3 Foreign ey integrity and (perational integrity.

    W,at is SAP locking / )t is a mechanism for defining and applying logical locs to database objects.

    W,at does a lock o"#ect in0ol0e / 1he tables 1he loc argument.

    W,at are t,e different kinds of lock &odes / #hared loc xclusive loc xtended exclusive l ist.

  • 8/12/2019 ABAP FAQ2

    22/77

    - 22 -

    5o can a lock o"#ect "e called in t,e transaction /

    - +y calling En1(e(e lock o"#ectC and )e1(e(e lock o"#ectC in the transaction.

    W,at are t,e e0ents ". ,ic, e can progra& ,elp te6ts and displa. possi"le 0al(es lists / %7('## (? AL%7D;#1 %(A- %7('## (? >$L;7D;#1 %(>-.

    W,at are f(nction &od(les / T.pes of para&eters / Function modules are generalpurpose library routines that are available systemwide.

    )n general, function module can have four types of parameters* %(71)?G* for passing data to the called function )0%(71)?G* for receiving data returned from the function module 1$+L#* for passing internal tables only, by reference that is, by address- 'A$?G)?G* for passing parameters to and from the function

    5o to send a report to t,e printer instead of displa.ing it on t,e screen / "e can send a report to the printer instead of displaying it on the screen. 1o do this, use the

    eywords 1( #$%#%((L*

    #;+0)1 7#FLF)?6 ... 1( #$%#%((L 6#1)?$1)(? &L1=@&.

    5o can e send data to e6ternal progra&s / ;sing #%$/G%$ parameters #$% memory- ;sing %(71/)0%(71 data $+$%/< memory-

    W,at are t,e differences "eteen SELE!T3OPTIONS;ARIANTS AN) PARAMETERS/1o enter values for variables on the selection screen, you must define the variables using the%$7$017# statement.1o enter a range of values for the variables on the selection screen we use #L'1(%1)(?# statement.)f you want to run the same report program with the same selections at regular intervals for example, formonthly sales statistics-, )n, $+$%/< offers you combine the desired values for all these selections in oneselection set. #uch a selection set is called a >$7)$?1#.

    W,at is SPA ' GPA / W,en do .o( (se it/1o fill the input fields of a called transaction with data from the report, you can use the #%$/G%$ techni!ue.#%$/G%$ parameters are values that the system stores in the global, userrelated #$% memory. Cou usethe #$% memory to transfer values between programs. $ user can access the values stored in the #$%memory during one terminal session for all modes used in parallel.;sually, the input fields on the initial screen of a transaction are connected to #%$/G%$ parameters. )f youfill these parameters from within your program before calling the transaction, the system fills the input fieldswith the corresponding values.

    W,. and ,o do .o( displa. a &essage/ W,at are t,e &essage t.pes/$n $+$%/< module lets the system now that an error has occurred by issuing information,error or warningmessages. you can also use success messages when a particular action is performed successfully. "henthe user presses ?17, the current process is interrupted. 1he system returns the user to the #$% mainmenu using $bend message.0essage is displayed using 0##$G nnn, where is the type of the message and nnn is the number ofthe message.Cou have to declare the )d of the message class in the program using0##$G)6 cc,where cc is the message class.

    5o and ,ere do Yo( create Message class/Cou can create a message class from two places in the system*

    9- From an (bject class object list in the (bject +rowser-:- From an $+$%/< module in the $+$%/< editor-

  • 8/12/2019 ABAP FAQ2

    23/77

    - 23 -

    W,at do .o( define in t,e )ata ele&ent and )o&ain/

    8or !ata "lement

    1he information includes the field&s representation on the screen in the form of F)L6 11#, '(L;0?'$%1)(?# in list outputs of the table contents and the format of the output via %$7$017 )6# and

    (nline field documentation.

    8or !omain

    6ata 1ype,Field Length and the allowed data values are defined .

    W,at is t,e difference "eteen a pool ta"le and a transparent ta"le/

    0ransparent 0able

    $ tran table has a one to onerelataionship in the database. 1he table in the dictionary has thesame name, same no of fields, and the fields have the same name as in the 78 table defn. $ transparenttabel has application data 0aster and 1ransaction-.

    +ooled 0able

    $ pool table has &an. to onerelation with the table in the database. For one table in the databasethere r many tables in the dictionary. 1ha table in the database has a diff name than in the table in the datadict, it has diff no of fields and field names are different. $ pooled table is stored in the pool at the databaselevel. $ table poo is a databse table with a special struct that enables the data of many 78 tables to bestored in it. )t can hold only pooled tables.

    W,at are field s.&"ols and field gro(ps/ 5a0e .o( (sed co&ponent id6 of str(ct(re it, fieldgro(ps/$ field symbol does not physically reserve space for a field, but points to a field which is not nown untilruntime of the program. Field symbols are comparable to the concept of pointers as used in theprogramming language '.$n extract dataset consists of a se!uence of records. 1hese records may have different structures. $ll

    records with the same structure form a record type. Cou must define each record type of an extract datasetas a field group, using the F)L6G7(;%# statement.

    W,at is t,e step ". step process to create a ta"le in data dictionar./9. #electing the table fields:. 0aintaining foreign eys8. 'reating secondary indexes optional-

  • 8/12/2019 ABAP FAQ2

    24/77

    - 24 -

    extract dataset.

    W,at is a collect state&ent and ,o is it different fro& t,e append state&ent/1o fill an internal table with lines which have uni!ue standard eys, we use the '(LL'1 statement.)f an entry with the same ey already exists, the '(LL'1 statement does not append a new line as

    $%%?6 statement, but adds the contents of the numeric fields in the wor area to the contents of thenumeric fields in the existing entry.

    W,at is an open S*L 0s Nati0e S*L%(pen #DL allows you to access all database tables nown to the #$% system, regardless of the databasemanufacturer. #ometimes, however, we may want to use databasespecific #DL statements called ?ative#DL in your $+$%/< program.1o avoid incompatibilities between different database tables and also to mae $+$%/< programsindependent of the database system in use, #$% has created a set of separate #DL statements called (pen#DL. (pen #DL contains a subset of standard #DL statements as well as some enhancements which arespecific to #$%.$ database interface translates #$%&s (pen #DL statements into #DL commands specific to the databasein use. ?ative #DL statements access the database directly.

    W,at does an EFE! S*L state&ent do in ABAP/ W,at is t,e disad0antage of (sing it/

    1o use a ?ative #DL statement, it must be preceded by an ' #DL statement and concluded by an?6' statement.$n $+$%/< program with ?ative #DL statements does not generally run with different databases.

    W,at are t,e e0ents (sed in ABAP7/1he events are )?)1)$L)O$1)(?

    $1 #L'1)(?#'7?

    $1 #L'1)(?#'7? (? 2field3

    #1$71(F#L'1)(?

    1(%(F%$G

    1(%(F%$G 6;7)?G L)? #L'1)(?

    ?6(F%$G

    ?6(F#L'1)(? $1 ;#7'(00$?6

    $1 L)?#L'1)(?

    $1 %F2??3

    G1

    G1 L$1.

    $1 ;ser 'ommand

    W,at is an interacti0e reports / W,at is t,e o"0io(s difference of s(c, reports it, 5TML t.pereports/)nteractive reporting allows the user to participate actively in retrieving and presenting data during thesession. )nstead of one extensive and detailed list, with interactive reporting you create a condensed basiclist from which the user can call detailed information by positioning the cursor and entering commands.)nteractive reporting thus reduces information retrieval to the data actually re!uired.6etailed information is presented in secondary lists. $ secondary list may either overlay the basic listcompletely or appear in an additional dialog window on the same screen. 1he secondary list can itself beinteractive again.$part from creating secondary lists, interactive reporting also allows to call transactions or other reportsfrom lists. 1hese programs then use values displayed in the list as input values. 1he user can, for example,call a transaction from within a list to change the database table whose data is displayed in the list.

  • 8/12/2019 ABAP FAQ2

    25/77

    - 25 -

    W,at ,appens ,en a ta"le is acti0ated in ))/"hen the table is activated, a physical table definition in the database is added to the table definition storedin the $+$%/< 6ictionary. 1he databaseindependent table definition from the $+$%/< 6ictionary istranslated into a definition of the relevant database.

    W,at is a c,eck ta"le and W,at is a 0al(e ta"le/

    1he relational data model contains not only tables, but also relationships between tables. 1heserelationships are defined in the $+$%/< 6ictionary by foreign eys. $n important function of foreign eys isto support data integrity in the relational data model. Foreign ey fields may assume only those valuesallowed by the chec table, in other words, values occurring in the primary ey of the chec table.$ foreign ey provides a lin between two tables, for eg.,19 and 1: by including a reference in table 19 tothe primary ey of table 1:. For this purpose, Foreign ey fields assigned to the primary ey fields of 1: areincluded in 19. 1able 19, which is the one being checed, is called a foreign ey table, and table 1: is calleda chec table. 1he terms dependent foreign ey- table and referenced chec- table are also used.

    >$L; 1$+L*)f the domain of the chec field has a value table, this is proposed by the system as chectable in the foreign field maintenance. 1he ey fields of the value table are in this case assigned fields of theforeign ey table with the same domain. 1hese fields may assume only those values allowed by the valuetable.1he value range of the domain can be defined by specifying value table.$ll table fields referring to thisdomain can then be checed against the corresponding field of this value table.)n order the chec can be

    executed, a foreign ey must be defined for the value table.

    W,at are &atc,codes/ )escri"e/$ matchcode is a tool to search for data records in the system. 0atchcodes are an eff icient and userfriendlysearch aid for cases where the ey of a record is unnown.)t consists of two stages one is 0atch code object and the other is 0atchcode )6.$ matchcode object describes the set of all possible search paths for a search term.0atchcode )6 describes a special search path for a search term.

    W,at are ranges/ W,at are n(&"er ranges/)t is often necessary to directly access individual records in a data structure. 1his is done using uni!ue eys.?umber ranges are used to assign numbers to individual database records for a commercial object, tocomplete the ey. #uch numbers are e.g. order numbers or material master numbers.

    5o do .o( 0alidate t,e selection criteria of a report/ And ,o do .o( displa. initial 0al(es in aselection screen/1he selection criteria is validated in the processing bloc of the $1 #L'1)(? #'7? event for the inputvalues on the screen and respective messages can be sent.1o display initial values in the selection screen* ;se )?)1)$L)O$1)(? >?1

    ;se 6F$;L1 >$L; option of %$7$017# #tatement

    ;se #%$/G%$ %arameters %)6s-.

    W,at is t,e !lient concept in SAP/ W,at is t,e &eaning of !lient independent/)n commercial, organi5ational and technical terms, the client is a self contained unit in the 78 system, with

    separate set of 0aster data and its own set of 1ables."hen a change is made in one client all other clients are affected in the system this type of objects arecalled 'lient independent objects.

    W,at is Internal ta"le/)nternal tables are table objects that only exist for the runtime of the program. 1here are several

    $+$% statements for woring with internal tables, for example, append, insert, delete, or find lines.

    1he number of lines of an internal table is extended dynamically at runtime as re!uired.

  • 8/12/2019 ABAP FAQ2

    26/77

    - 26 -

    Cou can use internal tables for table calculations on subsets of database tables. For example, you can reada part of one or more database tables into an internal table.

    1hey also allow you to reorgani5e their contents to suit the needs of your program. Cou can, for example,read particular entries from one or more large customer tables into an internal table, and then use them tocreate a list. "hen you run your program, you can access this data directly, instead of having to search foreach record in the database.

    W,at is a 0ariant and ,ere do .o( (se it/)f you want to run a report program with same selections at regular intervals for example, for

    monthly sales statistics-, you would not want to enter the same values each time. #o, $+$%/< offers you apossibility to combine the desired values for all these selections in one selection set. Cou can create asmany different selection sets as you lie for each report program and they remain assigned only to the reportprogram in !uestion. #uch a selection set is called a variant.;sing >ariants (nline;sing >ariants in +acground %rocessing(nline, starting a report via variant saves the user wor,minimi5es input errors. )n bacground processing, avariant is the only possibility you have to pass values for the selections.

    1o fill certain selections with values that change according to the application, you use a variant, which taesthe variable values from 1able T;AR;.

    W,at is set para&eter and get para&eter/

    "e can pass data to a called program using #%$/G%$ parameters. #%$/G%$ parameters are fieldvalues saved globally in memory. ach parameter is identified by a threecharacter code* you can definethese parameters in the object browser by selecting (ther objects on the first screen. 1he #%$/G%$ storageis userspecific and valid throughout all the user&s sessions.by using the #1 %$7$017 or G1%$7$017 statements

    1hese statements let you store and retrieve #%$/G%$ values from an $+$%/< program. )f the selectionscreens for the two transactions do not share the same re!uired fields, use these statements to store screenfields explicitly by name.+efore calling the new transaction from a %$) module, store the caller transaction&s fields under one name*

    #1 %$7$017 )6 &7)6& F)L6 2F)L6 ?$093.

    1he system stores the value in 2field name93 in the #%$ parameter &7)6&. 1he threecharacter identifier&7)6& must be defined in the #$% table 1%$7$. )f the #%$ parameter &7)6& already contains a value, the#1 %$7$017 statement overwrites it with the contents of 2F)L6 ?$093-.)n the %+( module for the called transaction, retrieve the fields under the other name*

    G1 %$7$017 )6 &7)6& F)L6 2F)L6 ?$0:3.

    W,at is field s.&"ol/

    $ field symbol does not physically reserve space for a f ield, but points to a field which is not nownuntil runtime of the program. #ometimes you only now which field you want to process, and how you wantto process it, at runtime.For this purpose, you can create field symbols in your program. $t runtime, you can assign real fields tosuch field symbols. $ll operations which you have programmed with the field symbol are then carried outwith the assigned field. $fter successful assignment, there is no difference in $+$%/< whether you referencethe field symbol or the field itself.

    5o to (se a grid list/;se Function 0odule 6isplayK4L)#1. )n ;r program .%ut all the data that ; want to output in its final formatand then pass this internal table to the function module

    0wo types of grid list .

  • 8/12/2019 ABAP FAQ2

    27/77

    - 27 -

    6)#%L$CKG7)6KL)#1>ersion GL@@ 1able adjustment across clients7#+6'#;+ 7elease batchinput sessions automatically 7#'L1'(% 'opy

    tables across clients7#)?'L@@ xtended program list7#(7$7L Get the (racle 7elease7#%$7$0 6isplay all instance parameters

    7#1#'7% 1ransport #$%script files across systems7G;G+7@@ #ubstitution/>alidation utility7#;#7@@8 'hec the passwords of users #$%4 and 66)' in all clients7#;#7@@I List users last login7#1L60' 1o Load L(G(s to application server

    Interacti0e Reporting

    )nteractive reporting allows the user to participate actively in retrieving and presenting data during thesession. )nstead of one extensive and detailed list, with interactive reporting you create a condensed basiclist from which the user can call detailed information by positioning the cursor and entering commands.)nteractive reporting thus reduces information retrieval to the data actually re!uired.

    W,at are t,e e0ent ke. ords in interacti0e reporting /

    E0ent ke.ord E0ent

    $1 L)?#L'1)(? 0oment at which the user selects a line by doubleclicing on it or by positioning the cursor on it andpressing F:.

    $1 ;#7'(00$?6 0oment at which the user presses a function ey.1(%(F%$G 6;7)?G L)?#L'1)(?

    0oment during list processing of a secondary list atwhicha new page starts.

    W,at is secondar. list /#econdary lists allow you to enhance the information presented in the basic list. 1he user can, for example,select a line of the basic list for which he wants to see more detailed information. Cou display these details

    on a secondary list.#econdary lists may either overlay the basic list completely or you can display them in anextra window on the screen. 1he secondary lists can themselves be interactive again.

    5o to select 0alid lines for secondar. list /1o prevent the user from selecting invalid lines, $+$%/< offers several possibilities. $t the end of theprocessing bloc ?6(F#L'1)(?, delete the contents of one or more fields you previously stored forvalid lines using the A)6 statement. $t the event $1 L)?#L'1)(?, chec whether the wor area isinitial or whether the A)6 statement stored field contents there. )n the latter case, create a secondary list,since you previously stored field contents for valid lines only. $fter processing the secondary list, clear thewor area again. 1his prevents the user from trying to create further secondary lists from the secondary list

  • 8/12/2019 ABAP FAQ2

    28/77

    - 28 -

    displayed.

    5o to create (ser interfaces for lists /1he 7/8 system automatically generates a graphical user interface G;)- for your lists that offers the basicfunctions for list processing, such as saving or printing the list. )f you want to include additional functionality,such as pushbuttons, you must define your own interface status.1o create a new status, the 6evelopment

    "orbench offers the 0enu %ainter. "ith the 0enu %ainter,you can create menus and applicationtoolbars.$nd you can assign Function eys to certain functions. $t the beginning of the statement bloc of$1 ?6(F#L'1)(?, activate the status of the basic list using the statement* #1 %F#1$1;#$1;#&.

    !an e call reports and transactions fro& interacti0e reporting lists /C#.)nteractive reporting also allows you to call transactions or other reports from lists. 1hese programsthen use values displayed in the list as input values.1he user can, for example, call a transaction from withina list to change the database table whose data is displayed in the list.

    5o to &aintain lists /1o return from a high list level to the nextlower level #CL#)?6-, the user chooses +ac on a secondarylist.1he system then releases the currently displayed list and activates the list created one step earlier.1he

    system deletes the contents of the released list.1o explicitly specify the list level into which you want to placeoutput, set the #CL#)?6 field. 1he system accepts only index values which correspond to existing listlevels.)t then deletes all existing list levels whose index is greater or e!ual to the index you specify.Forexample, if you set #CL#)?6 to @, the system deletes all secondary lists and overwrites the basic list withthe current secondary list.

    W,at are t,e page ,eaders for secondar. lists/(n secondary lists, the system does not display a standard page header and it does not trigger the event1(%(F%$G.1o create page headers for secondary list, you must enhance 1(%(F%$G*

    )yntax 1(%(F%$G 6;7)?G L)?#L'1)(?. 1he system triggers this event for each secondarylist. )f you want to create different page headers for different list levels, you must program the processingbloc of this event accordingly, for example by using system fields such as #CL#)?6 or #C%FBC incontrol statements )F, '$#-.

    W,at is &eant ". stacked list /$ #taced list is nothing but secondary list and is displayed on a fullsi5e screen unless you have specifiedits coordinates using the window command.

    Is t,e "asic list deleted ,en t,e ne list is created/?(.)t is not deleted and you can return bac to it using one of the standard navigation functions lie clicingon the bac button or the cancel button.

    W,at is &eant ". ,otspots /Aotspot is a list area where the mouse pointer appears as an upright hand symbol."hen a user points tothat areaand the hand cursor is active-,a singleclic does the same thing as a doubleclic. Aotspots aresupported from 7/8 release 8.@c.

    In ,ic, s.ste& field does t,e na&e of c(rrent g(i stat(s is t,ere /1he name of the current G;) #1$1;# is available in the system field #C%FBC.

    W,at is &eant ". ,ide area /1he hide command temporarily stores the contents of the field at the current line in a systemcontrolledmemory called the A)6 $7$.$t an interactive event,the contents of the field is restored from the A)6$7$. "hen calling a secondary list from a list line for which the A)6 fields are stored, the system fills thestored values bac into the variables in the program. )n the program code, insert the A)6 statement directlyafter the "7)1 statement for the current line.

  • 8/12/2019 ABAP FAQ2

    29/77

    - 29 -

    W,en t,e get c(rsor co&&and (sed in interacti0e lists /)f the hidden information is not sufficient to uni!uely identify the selected line ,the command G1 ';7#(7is used.1he G1 ';7#(7 command returns the name of the field at the cursor position in a field specifiedafter the addition field,and the value of the selected field in a field specified after value.

    5o to pass data fro& list to report /

    $+$%/< provides three ways of passing data* %assing data automatically using system fields ;sing statements in the program to fetch data %assing list attributes

    5o to call ot,er progra&s /

    Report Transaction

    'all and return #;+0)1 $?6 71;7? '$LL 17$?#$'1)(?'all without return #;+0)1 L$> 1( 17$?#$'1)(?

    S.ste& fields (sed in interacti0e Reporting1he SY3LSIN)system field contains the index of the list currently created. "hile creating a basic list, #CL#)?6 e!uals @.

    "ith each interactive event, the system automatically sets the following system fields*

    S.ste& field Infor&ation#CL)?'1 total line count of a list

    #CL)??( current l ine no where cursor is placed.

    SY3LSIN) )ndex of the list currently created during the current event basic list @-#CL)#1) )ndex of the list level from which the event was triggered

    #CL)LL) $bsolute number of the line from which the event was triggered#CL)#L 'ontents of the line from which the event was triggered#C';7(" %osition of the line in the window from which the event was triggered counting starts with

    9-#C';'(L %osition of the column in the window from which the event was triggered counting starts

    with :-#C;'(00 Function code that triggered the event#C%FBC $lways contains the status of the current list.

    TOP3O@3PAGE )2RING LINE3SELE!TION%

    1he system triggers this event for each secondary list. )f you want to create different page headers fordifferent list levels, you must program the processing bloc of this event accordingly, for example by usingsystem fields such as #CL#)?6 or #C%FBC in control statements )F, '$#-.

  • 8/12/2019 ABAP FAQ2

    30/77

    - 30 -

    )ata fro& S.ste& @ields of Interacti0e Lists

    From system fields, you retrieve the following information* the index of a list, the position of the list in theoutput window, and the location of the cursor. 1he only system field that contains the contents of theselected line is #CL)#L.

    Passing )ata ". Progra& State&ents

    1o pass individual output fields or additional information from a line to the corresponding processing blocduring an interactive event, use these statements*

    5I)E1he A)6 statement is one of the fundamental statements for interactive reporting. ;sing the A)6techni!ue, you can at the moment you create a list level define, which information later to pass to thesubse!uent secondary lists.

    #yntax A)6 2f3.g A)6* #%FL)'$77)6, #%FL)'(??)6, ?;0.

    REA) LINE;se the statements 7$6 L)? and 7$6 ';77?1 L)? to explicitly read data from the lines of existing

    list levels. 1hese statements are tightly connected to the A)6techni!ue.

    #yntax *

    7$6 L)? 2lin3 P)?6 2idx3QPF)L6 >$L; 2f93 P)?1( 2g 93Q... 2f n3 P)?1( 2g n3QQP(F ';77?1 %$GX(F %$G 2p3Q.

    g *

    7$6 L)? #C)?6 F)L6 >$L; +(.

    GET !2RSOR;se the statements G1 ';7#(7 F)L6 and G1 ';7#(7 L)? to pass the output field or output line onwhich the cursor was positioned during the interactive event to the processing bloc.

    #yntaxG1 ';7#(7 F)L6 2f3 P(FF#1 2off3Q PL)? 2lin3QP>$L; 2val3Q PL?G1A 2len3Q.

    SET !2RSOR

    1o set the cursor, use the #1 ';7#(7 statement. 1his statement sets the cursor in the most recentlycreated list. "hile creating the basic list, this is always the basic list itself. "hile creating a secondary list,this is the previous list.

    #1 ';7#(7 2col3 2lin3.1his statement sets the cursor to column 2col3 of line 2lin3 of the output window.

    !alling Progra&s

    )f you need to program an extensive application, one single program will become very complex. 1o mae theprogram easier to read, it is often reasonable to divide the re!uired functions among several programs.

    $+$% allows you to call reports as well as transactions using these statements*

  • 8/12/2019 ABAP FAQ2

    31/77

    - 31 -

    7eport 1ransaction'all without return #;+0)1 L$> 1( 17$?#$'1)(?'all and return #;+0)1 $?6 71;7? '$LL 17$?#$'1)(?

    T.pical Str(ct(re of ABAP Progra&

    9. 7eport 6efinitions 4

    :. 1able and 6ata definitions 4

    8. )nitiali5ation event

  • 8/12/2019 ABAP FAQ2

    32/77

    - 32 -

    =. @or& E0ent

    #imilar to %7F(70/#;+7(;1)?#

    #1$71# with F(70 and ends with ?6F(70

    $ll statements between ?6F(70 and end of program are never processed

    #imilarly all statements between ?6F(70 and event eyword are never processed.

    I. Li&itations of Si&ple PER@ORM

    >alues can be passed through %7F(70 to F(70.

    Giving the flexibility to use the same subroutine multiple number of times.

    #yntax9* %7F(70 23 using 2CCC3changing 20003

    F(70 23 using 2CCC3 lie 2OOO3

    changing 20003 lie 2???3 %ass by reference(7

    F(70 23 using value CCC- lie 2OOO3 %ass by value, creates another copy ofthe variable.

    xample9*%7F(70 dateinvert using indate

    'hanging outdate

    F(70 dateinvert using indate lie datum

    #yntax:* %7F(70 functionnameprogram- )F F(;?6.

    xample:* %7F(70 A$67F(70%((L- )F F(;?6.

    I. Get e0ent

    G1 2 table name 3

    7eads data of all columns from all database table falling in the hierarchy

    ?eeds to mention table name in

    1$+L#* parametersWWW

    (nly fields part of the tables mentioned in the 1$+L#* parameter can be viewed S edited

    V. To E6it fro& an E0ent

    xit N )t exits from the respective subroutine were this syntax is used , generally condition forthe )1 is stated before this syntax

    'hec here the conditional chec is done at the same time .

  • 8/12/2019 ABAP FAQ2

    33/77

    - 33 -

    'A'B 2condition3)f the condition is not satisfied, the system leaves the subroutine and resumesthe processing after the %7F(70 statement

    #top N it is the abrupt stopping the program flow

    E. !ALLing @(nctional Mod(les

    #yntax*'$LL F;?'1)(? 2module3

    P%(71)?G f9 a9 .... fn anQP)0%(71)?G f9 a9 .... fn anQP'A$?G)?G f9 a9 .... fn anQP1$+L# f9 a9 .... fn anQP'%1)(?# e9 r9 .... en rn

    xample*'$LL F;?'1)(? &OK6$1K'(?>7#)(?&

    %(71)?G #16K6$1 G?K6$1)0%(71)?G 'AK6$1 ?"K6$1

    % List E0ents

    1(%(f%$G, ?6(F%$G,

    $1 L)?#L'1)(?, $1 ;#7'(00$?6

    1hese events are triggered by the $+$% runtime environment while a list is being created orwhen a user performs an action on a list. 1he statement in these blocs can format the list orprocess the users re!uest.

    ABAP PER@ORMAN!E ISS2ES%

    ABAP'7 Opti&i4ation

    ;se the G1 7;? 1)0 command to help evaluate performance. )t&s hard to now whether thatoptimi5ation techni!ue 7$LLC helps unless you test it out. ;sing this tool can help you now what iseffective, under what inds of conditions. 1he G1 7;? 1)0 has problems under multiple '%;s, soyou should use it to test small pieces of your program, rather than the whole program.

    $void L'1 4&, especially in tables that have a lot of fields. ;se #L'1 $ + ' )?1( instead, sothat fields are only read if they are used. 1his can mae a very big difference.

    Fieldgroups can be useful for multilevel sorting and displaying. Aowever, they write their data to thesystem&s paging space, rather than to memory internal tables use memory-. For this reason, field

    groups are only appropriate for processing large lists e.g. over =@,@@@ records-. )f you have large lists,you should wor with the systems administrator to decide the maximum amount of 7$0 your programshould use, and from that, calculate how much space your lists will use. 1hen you can decide whetherto write the data to memory or swap space. #ee the Fieldgroups $+$% example.

    ;se as many table eys as possible in the "A7 part of your select statements.

    "henever possible, design the program to access a relatively constant number of records for instance,if you only access the transactions for one month, then there probably will be a reasonable range, lie9:@@9E@@, for the number of transactions inputted within that month-. 1hen use a #L'1 $ + ' )?1(

  • 8/12/2019 ABAP FAQ2

    34/77

    - 34 -

    1$+L )1$+ statement.

    Get a good idea of how many records you will be accessing. Log into your productive system, and use#E@ 3 6ictionary (bjects press dit-, enter the table name you want to see, and press 6isplay. Go1o ;tilities 3 1able 'ontents to !uery the table contents and see the number of records. 1his isextremely useful in optimi5ing a program&s memory allocation.

    1ry to mae the user interface such that the program gradually unfolds more information to the user,rather than giving a huge list of information all at once to the user.

    6eclare your internal tables using ('';7# ?;0K7'#, where ?;0K7'# is the number of recordsyou expect to be accessing. )f the number of records exceeds ?;0K7'#, the data will be ept inswap space not memory-.

    ;se #L'1 $ + ' )?1( 1$+L )1$+ whenever possible. 1his will read all of the records into the itabin one operation, rather than repeated operations that result from a #L'1 $ + ' )?1( )1$+...?6#L'1 statement. 0ae sure that )1$+ is declared with ('';7# ?;0K7'#, where?;0K7'# is the number of records you expect to access.

    0any tables contain totals fields such as monthly expense totals-. ;se these avoid wasting resourcesby calculating a total that has already been calculated and stored.

    %rogram $nalysis ;tility1o determine the usage of variables and subroutines within a program, you can use the $+$% utility called

    ]%rogram $nalysis included in transaction #8E. 1o do so, execute transaction #8E, enter your programname, then use the path ;tilities 3 %rogram $nalysis

    ABAP PER@ORMAN!E IMPRO;EMENTS ;IA )ATA )I!TIONARY

    )?6 '7$1)(? #;GG#1)(?# 7L$16 1( 6$1$+$# %7F(70$?'

    R 1he columns at the beginning of an index are the most [common\. 1he most [common\ columns arethose where reports are selecting columns with no ranges the where clause for these columns is an [e!ualto\ expression. 7earrange columns of an index to match the selection criteria. For example, if a selectstatement is written to include columns 9 and : with [e!ual to\ expressions in the where clause and column

    8 and < are selected with value ranges, then the index should be created with columns in the se!uence of9,:,8,)" tables to effectively join and [denormali5e\ related tables that are taing large amounts oftime to select for reporting. For example, at times where highly accessed tables normali5e description textinto one table and the header data into another table, it may mae sense to create a view table that joins therelevant fields of the two associated with a poor performing $+$%.

    For %((L tables that contain large amounts of data and are highly accessed, convert the pooled table

    into a transparent table and add an index. %((L6 tables are supposed to be collections of smallertables that are !uicly accessed from the database or are completely buffered in memory. %ooledtables containing more than a few hundred rows and are accessed many times in a report or transactionare candidates for %((L to 17$?#%$7?1 'onversion. For example, table A!" contains tax

    #urisdiction condition information and are accessed more t$an ten times in t$e sales ordercreate transaction% &f t$e entire 'nited States tax codes are loaded into t$ese condition tables,t$e time to save a sales order increases to unacceptable levels% (onverting t$e tax conditiontable to transparent and creating an index based upon t$e )e* fields, decreases processing timefrom minutes to seconds%

    R 6o not allow the use of L)B in an #$% #DL statement accessing a large table.

  • 8/12/2019 ABAP FAQ2

    35/77

    - 35 -

    R ;se internal tables in $+$%s to preselect values once and store values in memory for sorting andsearching purposes this is an assumption stated at the beginning of this discussion-.

    R $void logical databases when not processing all row s of a table. )n fact, a logical database is merelya group of nested #$% #DL #L'1 statements. )n general, when processing a small number of rows in alarger table is re!uired, the use of internal tables and ?(1 using a logical database or nested selects will be

    much better for performance.

    ABAP IMPORTANT REPORTS

    7#+6'+1'#ubmit a +6' job with an internal batch number and wait for the end of the batch input session.

    7#+6'#;+7elease batch input sessions automatically

    ABAP IMPORTANT T!O)ES

    (##9 #$% (nline #ervice #ystem#098 ;pdate monitor. "ill show update tass status. >ery useful to determine why an

    update failed.#@@9 $+$% 6evelopment "orbench#@9 (ld 1ransport S 'orrections screen#9@ ?ew 1ransport S 'orrection screen#@J "orbench (rgani5er#9I 6ata +rowser* )nitial #creen.#8@ $+$%/< 7untime $nalysis#8I $+$%/

  • 8/12/2019 ABAP FAQ2

    36/77

    - 36 -

    +6'

    $L &;%6$&

    H7 How can we position the cursor on a particular "iel! ?

    - +6'6$1$F?$0 ]+6'K';7#(7+6'6$1$F>$L 2F)L6?$03

    H= Who are Dialog users an! who are Bac3groun! users ?

    - 6ialog users are normal interactive users in the #$% system. +acground users are usermaster records that are specially defined for providing authori5ations for bacgroundprocessing jobs.

    H What is the use o" BDC0,+S)R ?

    - "e add a transaction to a +atch )nput #ession by using this function.

    HH What are the up!ate $o!es in CA&& RA+SAC,-+ ?

    - # * #ynchronous

    - $ * $synchrnous- L * Local

  • 8/12/2019 ABAP FAQ2

    42/77

    - 42 -

    H What !oes the $essage para$eter in!icates ?

    - 1he message parameter indicates there all system messages issued during a '$LL17$?#$'1)(? are written into the internal table 2itab3. 1he internal table must have thestructure of +6'0#G'(LL.

    H What is Direct ,nput ?

    - 1o enhance the batch input procedure, the system offers the direct input techni!ue especially

    for transferring large amount of data. 1his techni!ue doesnt create sessions but stores thedata directly. 1he direct input programs must be executed in the bac ground only. 1omaintain and start these programs, use program 7+0>#A(" or the transaction +0>(.

    What are the "eatures o" Recor!ing Function ?

    - recording transaction runs

    - creating batch input sessions from the recorded transaction runs.

    - Generating a batch input program from the recorded data.

    < What is synchrnous !ata%ase up!ate ?

    - 6uring the processing, no transaction is stored until the previous transaction has been writtento the database. 1his is called #ynchronous database update.

    Q 5o do .o( set (p "atc, process/6ata analysis* $naly5e the data that is to be transferred to the #$% #ystem.

    XXGenerate #$% structures* Generate #$% data structures for incorporation into your data exportprogram. XX6evelop transfer program* Cou can write the program in $+$%/< or as an external program.

    XX'reate se!uential file* xport the data that is to be transferred, to a se!uential file.

    XX'reate batch input program* $+$%/< batch input program that will read the data to be transferred fromthe se!uential file.

    XX%rocess batch input data* %rocess the data and add it to the #$% #ystem. Cou can do this either by*

    batchinput session method or 'all transaction method. XX$nalyse results* 'hec that all data has been successfully processed. XX$nalyse rror session* 'orrect and reprocess erroneous data.

    - Where !o you use BDC?

    transferring data from another system when you install your #$% #ystem

    regularly transferring data that is captured by a non#$% system in your company into the #$%#ystem. $ssume, for example, that data collection in some areas of your company is stillperformed by a non#$% system. Cou can still consolidate all of your data in the #$% #ystem byexporting the data from the other system and reading it into the #$% #ystem with batch input.

    Cou can also use batch input to transfer data between two 7/8 #ystems. Aowever, there are moredirect methods for doing this, such as 7F' remote function calls-.

    7 What has to %e !one to the pac3e! "iel!s %e"ore su%$itting to a BDC session?6eclare these fields in the internal table as characters and the length of the field should be same as thefield length of the field&s data element. 1his internal table is used to hold the data fetched from these!uential file using "#upload function module

    What is &S'W

    1he L#0" is a crossapplication component '$- of the #$% 7/8 #ystem.1he tool has interfaces with the 6ata 1ransfer 'enter and with batch input and direct input processingas well as standard interfaces +$%) and )6oc in 7/8.

  • 8/12/2019 ABAP FAQ2

    43/77

    - 43 -

    1he L#0" comprises the following &ain f(nctions*9. 7ead data legacy data in spreadsheet tables and/or se!uential files-.

    Function ,ead data replaces and enhances functions )preadsheet interface and 3ostinterface of L#0" version 9.@. Cou can use any combination out of %' and server files now.

    :. 'onvert data from the source into the target format-.8. )mport data to the database used by the 7/8 application-.

    C-D) 4 &S'W

    SAP Scripts

    W,at is sap script and la.o(t set/$ns #$%script is the integrated text management system of the #$% 7/8 #ystem. #$%script is tightlyintegrated into the #$% #ystem. )t is used for many different wordprocessing tass all over the #$%#ystem.

    W,at is la.o(t set/

    $ layout set in #$%script is used for page layout. 1he layout set contains various elements, which are usedfor layout control of the individual pages and also contain layout information for texts which are to be outputon the individual pages.

    1he layot of a document is defined in a layot set.$ layout set specified the appearance and structure of a document.

    Layout sets contain predefined text modules with space reserved for variable data. Cou can use these textmodules for different application.

  • 8/12/2019 ABAP FAQ2

    44/77

    - 44 -

    very #$%script document uses a layout set.

    1o mae changes to your documents, such as moving a piece of text, or changing fonts, paragraph formats,and tabs, you only need to change the layout set.

    T,ere are to a.s of for&atting te6ts (sing la.o(t sets$

    1he text is entered and output in standard text maintenance. Cou can assign any layout set. 1ext canalso be entered via the layout set a letter header, for example.1he text is formatted via an $+$%/< program using a layout set. 1he program can either dynamicallyoutput individual predefined text modules, text elements or transfer entire texts, which are to be outputin the layout set.

    Yo( can (se #tylesto define t,e for&atting of t,e te6t in .o(r doc(&ents% A st.ledeter&ines te6t for&atting ". setting t,e paragrap, and c,aracter for&ats (sed in adoc(&ent% Yo( can for e6a&ple (se a st.le to ,ig,lig,t c,aracter strings or ,oleparagrap,s% Yo( can assign a st.le to an. te6t% T.picall. ,oe0er .o(Kll (se st.lespri&aril. in t,e &ain indos of la.o(t sets ,ere (sers t.pe or enter te6t directl.in doc(&ents%

    5eader data is fo(nd in "ot, st.le and la.o(t set &aintenance%)n style maintenance, it is used primarily to present important information designed to mae it easier

    for the end user to select a style. 1he header data in layout set maintenance, on the other hand, isused for information and control purposes.

    "indows are defined in layout set maintenance. 1hey represent areaswhich are positioned on pages as page windows and in which text islater output. $t least one window must be defined for each layout set. )fnot, a text cannot be formatted by #$% script.

    T,e folloing indo t.pes can "e (sed$

    MAINN 0ain window in which continuous text is output. 1his is the window used by dialog users of aprint program and layout set. For example the body text of a letter would be entered in 0$)?.

    ;AR N "indow with variable contents. 1he text can vary on each page in which the window ispositioned. >ariable windows are formatted for each page.

    !ONSTN "indow with constant contents which is only formatted once.

    A la.o(t set ,as t,e folloing ele&ents$

    5eader data 6ata related to development created by, development class, etc.- and layout setinformation which elements are used- are both stored in the header data. $ start page must beentered here.

    Paragrap, for&ats %aragraph formats are re!uired in layout sets as in styles in order to formattexts. Aowever, they are also used for word processing in layout sets, for example, to format textelements.

    !,aracter for&ats Cou can also use character formats to format texts or paragraphs. ;nlieparagraph formats, however, they are used to format text within a paragraph.

    Windows 4 Win!ows are na$es an! win!ow types5 which are not physically positione! until they areallocate! to pages an! units o" $easure$ent are speci"ie!6

    Pages %ages are defined to provide the system with a start and end point in text formatting.

    Page indos %age windows are the combination of windows and pages, where the dimensions of awindow and its position on a page are specified.

    1he purpose of SAP script control co&&andsis to allow control of the

  • 8/12/2019 ABAP FAQ2

    45/77

    - 45 -

    output formatting. 1hese commands are not interpreted by the #$%scripteditor, but are passed through to the #$%script 'omposer for processing. 1hecomposer is the program that converts text from the form displayed in the editor tothe form used for printing.

    W,at is SAPscript and e6plain its p(rpose/

    #$% #cript is the #$% systems own textproessing system. Coull find that it loos and feels a lot lieother leading textprocessing system that you may use on your personal computer.

    very company needs to output documents with a uniformly defined layout eg. )nvoices, delivery notes,etc..- all the time.

    1he basic layout of the document is predefined , but in many cases, other data has to be merged withit, such as address data or purchase order items. 1his data might be entered manually by a employee,or retrieved from a database table.

    Large !uantities of these documents have to be produced. From printing is usually a mattter of largeprint runs of documents such as payslips, checs, order confirmation, reminders etc.

    #$%script has been developed to meet the above re!uirements. )1 is an integrated tool for text entryand form printing in 7/8 applications.

    1hese documents are normally provided by #$% but every organi5ation have their uni!ue wa!ys ofthese documents so to customi5e these and for creating newer ones if re!uired #$% script is used.

    W,at are co&ponents of SAPscript/Layout set, #$%script 1ext, $+$% %rint program , symbols, function modules lieopenKform, closeKFrom, 7eadKtext etc,.

    W,at are t,e ABAP'7 !o&&ands t,at link to a la.o(t set/'all function (%?form.'all function "7)1from.

    'all function 'L(#from

    I&porting Grap,ics 8Logos9 into SAPScript1he program 7#1L60' can be used to upload graphics file extension .tif on %' files- into individualstandard text.

    Ot,er (sef(l progra&s for SAPScript7#1F'(? 'onverts page format7#1#'7% ;pload/6ownload layout sets7#16+;G #$%#cript debugger

    )e"(g SAPScriptCou can debug a #$%#cript* ;se 1ools "ord %rocessing Layout #et.nter name of layout set and then ;tilities $ctivate 6ebugger.)t is of no conse!uence which layout set you enter when selecting the #$%script debugger. 0enupath* 1ools"ordprocessing Forms, ;tilities $ctivate 6ebugger- 1he next layoutset called will invoethe debugger. 1his is !uite handy when verifying which layoutset is being called >erifying customi5ingsettings-.$nother way to set the #$%#cript debugger is to run program 7#16+;G.

    "hen a Form is copied from one client to another .$nd )f ; try to display or change the form in thecopied client .1he possible error message cud be *9.Form not found1ry coping again specifing the language .

    :.)F )1 dispalys an error message saying 1hat the text file is inconsistent .1hen go to #8E and 7un [7#1'AB(\ .

  • 8/12/2019 ABAP FAQ2

    46/77

    - 46 -

    )t will as for the form name ,then chec all the checboxes and then run the program.?ote * all #cript related problems can be solved using %rogram ]7#14.

    5o to take a "ack (p of script la.o(t into 2Kr ,ard disk and load it later;se %rogram ,)09)C,+.

    Use EXPORT mode, when downlodin! nd "#PORT when $%lodin! s&'i%() *on+( o'!e( (o !ie (he o'mnme in (he o./e&( ield) This will &'e(e s&'i%( wi(h (he sme nme s (h( o (he o'i!inl s&'i%( ) " s&'i%(wi(h (he sme nme eis(s in (he sme &lien( ,(hen i( will !ie n e''o' O./e&( &nno( .e oe'w'i((en + )

    I ant to cop. ta"le across clients;se %rogram 7#'L1'(%

    To transfer script files across s.ste&s?ot 'lients- ,)09)C,+

    To co&pare t,e contents of a ta"le across clients* 7#1+#7>

    To c,ange t,e de0elop&ent class of an. o"#ect 7#"+(@=:

    W,at t.pe of 0aria"les nor&all. (sed in sap script to o(tp(t data/S1ables name fieldsS.

    5o do .o( n(&"er pages in sap script la.o(t o(tp(ts/S page SSnext %age S

    W,at takes &ost ti&e in SAP script progra&&ing/6efining layout set up / sets.

    5o do .o( (se ta" sets in la.o(t sets/6efine paragraph with defined tabs.

    How !o you %ac3up sap script layout sets? Can you !ownloa! an! uploa!? How?

    #$% script bacup * )n transaction #V9 goto ;tilities 3 'opy from client 3 Give source form name,source client @@@ default-, 1arget form name.6ownload * #V9, type form name 3 6isplay 3 ;tilities 3 form info 3 List 3 #ave to %' file.;pload * 'reate form with page, window, pagewindow with the help of downloaded %' file. 1extelements for %age windows to be copied from %' file.

    W,at is !o&pare Tool in SAP Script /#$% #cript offers tools for comparing objects across clients. "e can compare or copy the followinginds of objects.#tylesLayout sets6ocuments"ith the 'ompare tool we can do the following *'hec whether an object exists in both clients6isplay the differences between the versions of an object

    La.o(t Sets are used to control page layout and text formatting in documents .

    SAP Standard st.lesand layout sets are always held in 'lient @@@.

    In ,at for&at does SAP Script store te6t /

    Ps&'i%( (e(s 'e s(o'ed in "n(e'&hn!e Te( o'm( "T) Ps&'i%( oe's &one'sion %'o!'ms o' (he (e(ile o'm(s Ri&h Te( o'm( RT nd "" s n in(e'&e (o o(he' wo'd %'o&esso's)

    T,e 0ario(s indo t.pes in SAP Script are0ain, >ariable and 'onstant.

  • 8/12/2019 ABAP FAQ2

    47/77

    - 47 -

    T,e Ne3Page co&&andis used to force a %age brea in the text at any point.

    Protect %%% Endprotectcommand pairs can be nested 1rue / False-.False.

    )eli&iter + must be used immediately before and after the symbol.

    W,at does t,e co&poser do/

    1he final appearance of your documednt depends on interaction between the print program and thelayout set.

    1he #$%script print program initiali5es the printing process. very command entered using the#$%script programming interfaces is transferred to the composer.

    1he composer received layout information from the layout set specified by the print program. 1hedocuments are formatted according to this layout information.

    )f the documents contain variables, the compoer replaces these variables with data from the 7/8

    system, such as the current date, or with the userdata selected by the print program.

    1he print program controls the completion of thelayout set. (nce this is done, the composer places thecompleted document in the spool.

    W,ere do e define Ta" space for data in SAPScript/

    "hen defining the paragraph for the text element we can define the 1$+# then. 1here is parametercalled 1$+# to be defined in paragraph definition.

    ,at is difference "eteen Windo + a Page Windo/

    "indow* $n area that is predefined in the layout set. "indows are text modules, which are positionedon a document page.

    "e define the window type, 6efault %aragraph, specify the text elements or a #$%script text to beincluded etc in the "indcow 'omponent.

    %age"indow* we define the parameters of the earlier defined "indow, appearance on the documentlie left or right margins, "idth S Aeight.

    W,at are s.&"oles + state t,eir different t.pes it, E%g%

    $ #ymbol is a constant, which can be inserted in a document. )t saves the user unnecessary worwhen replacing sections of text, phrases, etc. ach symbol has a name which is encloses by S.

    g. Svariable name S#ystem symbols eg S6ateS, StimeS etc.

    #tandard symbols *#tandard symbols are userdefined. 1hey are maintained centrally in table 1161G.g. S#G6AS for the opening salutation * [dear sir/madam\.

    S0FGS for the closing salutation *\yours Faithfully\.

    %rogram #ymbols * %rogram symbols display data from the $+$%/< program which has called the wordprocessing function g. )tabconnid.

  • 8/12/2019 ABAP FAQ2

    48/77

    - 48 -

    1ext symbols* Cou can define a text symbol for any text module. 1his symbol is valid only in the textmodule for which you have defined it. g. 6efine S#ymbolS ]value.

    5o do e define Te6t s.&"ols/;sing the control command 6F)? Sx9S ]=I.

    State fe control co&&ands/%%rotect .. endprotect, define, newpage, include.. ifW endif.

    ,at is t,e p(rpose of Protect and EndProtect/%

    Cou can specify either in the style or in the layout set that a particular paragraph should not be slit intwo by a page bea. )f the page protect attribute is set then the complete paragraph is always outputona single page. 1his property applies only to that particular paragraph. #$%#cript provides the%7(1'1W ?6%7(1'1 command pair to allow you to define the areas to be protected against apage bea on an individual basis. 1hus the %7(1'1/?6%7(1'1 commands may be regarded asa ind of conditional ?"%$G command, the condition being whether or not the lines encl