new enchancements sap flori

83
8/20/2019 New Enchancements Sap Flori http://slidepdf.com/reader/full/new-enchancements-sap-flori 1/83  ( 001) How t o use a gr i d l i st ? Use Funct i on Modul e Di spl ay_*LI ST. I n U’ r pr ogr am . Put al l t he dat a t hat U want t o out put i n i t s f i nal f or mat and t hen pass t hi s i nt er nal t abl e t o t he f unct i on modul e  Two t ypes of gri d l i st . DI SPLAY_GRI D_LI ST( Ver si on 4. 0b) DI SPLAY_BASI C_LI ST( Ver si on 4. 6b) Cal cul at e t he subt ot al et c and save i t as a var i ant , However whi l e pr i nt i ng i t wi l l pr i nt al l t he ent i es of t he f i el ds ( 002) How t o pass dat a f r om t he f or m t o t he Subr out i ne pr ogr am? Use st r uct ur e I TCSY ( 003) How can we pass sel ecti on and par amet er dat a to a report ? - Ther e ar e t hr ee opt i ons f or passi ng sel ect i on and par amet er dat a t o t he r epor t . . usi ng SUBMI T.. . W I TH . usi ng a r epor t var i ant . usi ng a RANGE tabl e St andar d Pr ogr ams t hat ever y ABAPer Shud Know RSAVGL00 Tabl e adj ust ment acr oss cl i ent s RSBDCSUB Rel ease bat ch- i nput sessi ons aut omat i cal l y RSCLTCOP Copy t abl es across cl i ent s RSI NCL00 Ext ended pr ogr am l i st RSORAREL Get t he Or acl e Rel ease RSPARAM Di spl ay al l i nst ance paramet er s RSTXSCRP Transpor t SAPscr i pt f i l es acr oss syst ems RGUGBR00 Subst i t ut i on/ Val i dat i on ut i l i t y RSUSR003 Check t he passwords of users SAP* and DDI C i n al l cl i ent s RSUSR006 Li st users l ast l ogi n RSTXLDMC To Load LOGO’ s t o appl i cat i on server I nt eract i ve¬ Repor t i ng I nt er ac t i ve r epor t i ng al l ows t he user to par t i c i pat e act i vel y in r et r i evi ng and pr esent i ng dat a dur i ng t he sessi on. I nst ead of one ext ensi ve and det ai l ed l i st , wi th i nt er act i ve r epor t i ng you cr eat e a condensed basi c l i st f r om whi ch t he us er c an cal l det ai l ed i nf ormati on by posi t i oni ng t he cur sor and ent eri ng commands. I nt er act i ve

Upload: roys-palnati-s

Post on 07-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 1/83

 ( 001) How t o use a gr i d l i st ?Use Funct i on Modul e Di spl ay_*LI ST. I n U’ r pr ogr am . Put al lt he dat a that U want t o out put i n i t s f i nal f or mat and t henpass t hi s i nt er nal t abl e t o the f unct i on modul e

 Two t ypes of gr i d l i st .DI SPLAY_GRI D_LI ST(Ver si on 4. 0b)DI SPLAY_BASI C_LI ST(Ver si on 4. 6b)Cal cul at e t he subt ot al et c and save i t as a var i ant ,However whi l e pr i nt i ng i t wi l l pr i nt al l t he ent i es of t hef i el ds

( 002) How t o pass dat a f r om t he f or m t o t he Subr out i neprogram?Use st r uct ur e I TCSY

( 003) How can we pass sel ect i on and paramet er dat a t o areport ?- Ther e ar e t hr ee opt i ons f or passi ng sel ect i on andpar amet er dat a t o t he repor t .. usi ng SUBMI T. . . WI TH. usi ng a r epor t var i ant. usi ng a RANGE tabl e

St andar d Pr ograms t hat every ABAPer Shud KnowRSAVGL00 Tabl e adj ust ment across cl i ent sRSBDCSUB Rel ease bat ch- i nput sessi ons aut omat i cal l y

RSCLTCOP Copyt abl es across cl i ent sRSI NCL00 Ext ended pr ogr am l i stRSORAREL Get t he Or acl e Rel easeRSPARAM Di spl ay al l i nst ance paramet er sRSTXSCRP Transpor t SAPscr i pt f i l es acr oss syst emsRGUGBR00 Subst i t ut i on/ Val i dat i on ut i l i t yRSUSR003 Check t he passwor ds of user s SAP* and DDI C i n al lcl i ent s

RSUSR006 Li st users l ast l ogi nRSTXLDMC To Load LOGO’ s t o appl i cat i on server

I nt eract i ve¬  Repor t i ngI nt er act i ve r epor t i ng al l ows t he user t o par t i ci pat eact i vel y i n r et r i evi ng and pr esent i ng dat a dur i ng t hesessi on. I nst ead of one ext ensi ve and det ai l ed l i st , wi t hi nt er act i ve r epor t i ng you cr eat e a condensed basi c l i stf r om whi ch t he user can cal l det ai l ed i nf or mat i on byposi t i oni ng t he cur sor and ent er i ng commands. I nt er act i ve

Page 2: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 2/83

r epor t i ng thus r educes i nf or mat i on r et r i eval t o t he dat aactual l y requi r ed.

( 004) What ar e the event key wor ds i n i nt er act i ve r epor t i ng?

Event keywor d EventAT LI NE- SELECTI ON Moment at whi ch t he user sel ect s a l i neby doubl e- cl i cki ng on i t or by posi t i oni ng t he cur sor on i tand pr essi ng F2.

AT USER- COMMAND Moment at whi ch t he user presses a f unct i onkey. TOP- OF- PAGE DURI NG LI NE- SELECTI ON Moment dur i ng l i stpr ocessi ng of a secondar y l i st at whi ch a new page st ar t s.

( 005) What i s secondar y l i st ?Secondar y l i st s al l ow you t o enhance t he i nf or mat i onpr esent ed i n t he basi c l i st . The user can, f or exampl e,sel ect a l i ne of t he basi c l i st f or whi ch he want s t o seemor e det ai l ed i nf or mat i on. You di spl ay t hese det ai l s on asecondar y l i st . Secondar y l i st s may ei t her over l ay t hebasi c l i st compl et el y or you can di spl ay t hem i n an ext r awi ndow on t he scr een. The secondary l i st s can t hemsel ves bei nt er acti ve agai n.

( 006) How t o sel ect val i d l i nes f or secondar y l i st ? To pr event t he user f r om sel ect i ng i nval i d l i nes, ABAP/ 4

of f er s sever al possi bi l i t i es. At t he end of t he pr ocessi ngbl ock END- OF- SELECTI ON, del ete t he cont ent s of one or moref i el ds you pr evi ousl y st or ed f or val i d l i nes usi ng t he HI DEst at ement . At t he event AT LI NE- SELECTI ON, check whet hert he wor k ar ea i s i ni t i al or whet her t he HI DE st at ementst or ed f i el d cont ent s t her e. I n t he l at t er case, creat e asecondar y l i st , si nce you pr evi ousl y st or ed f i el d cont ent sf or val i d l i nes onl y. Af t er pr ocessi ng t he secondar y l i st ,cl ear t he wor k ar ea agai n. Thi s prevent s t he user f r omt r yi ng t o cr eat e f ur t her secondar y l i st s f r om t he secondar yl i st di spl ayed.

( 007) How t o creat e user i nt er f aces f or l i st s ? The R/ 3 syst em aut omat i cal l y gener at es a graphi cal useri nt er f ace ( GUI ) f or your l i st s t hat of f er s t he basi cf unct i ons f or l i st pr ocessi ng, such as savi ng or pr i nt i ngt he l i st . I f you want t o i ncl ude addi t i onal f unct i onal i t y,such as pushbut t ons, you must def i ne your own i nt er f acest at us. To cr eat e a new st at us, t he Devel opment Workbench

Page 3: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 3/83

of f er s t he Menu Pai nt er . Wi t h t he Menu Pai nt er , you cancr eate menus and appl i cat i on t ool bars. And you can assi gnFunct i on keys t o cer t ai n f unct i ons. At t he begi nni ng of t hest atement bl ock of AT END- OF- SELECTI ON, act i vat e t he st atusof t he basi c l i st usi ng t he st at ement : SET PF- STATUS

' STATUS' .

Can we cal l r epor t s and t r ansact i ons f r om i nt er act i vereport i ng l i sts ? YES. I nt er act i ve r epor t i ng al so al l ows you t o cal lt r ansact i ons or ot her r epor t s f r om l i st s. These pr ogr amst hen use val ues di spl ayed i n t he l i st as i nput val ues. Theuser can, f or exampl e, cal l a t r ansact i on f r om wi t hi n al i st t o change t he database t abl e whose dat a i s di spl ayedi n t he l i st .

How t o mai nt ai n l i st s ? To r et urn f r om a hi gh l i st l evel t o t he next - l ower l evel( SY- LSI ND) , t he user chooses Back on a secondary l i st . Thesyst em t hen r el eases t he cur r ent l y di spl ayed l i st andact i vat es t he l i st creat ed one st ep ear l i er . The syst emdel et es t he cont ent s of t he r el eased l i st . To expl i ci t l yspeci f y t he l i st l evel i nt o whi ch you want t o pl ace out put ,set t he SY- LSI ND f i el d. The syst em accept s onl y i ndexval ues whi ch cor r espond t o exi st i ng l i st l evel s. I t t hendel et es al l exi st i ng l i st l evel s whose i ndex i s gr eat er orequal t o t he i ndex you speci f y. For exampl e, i f you set SY-LSI ND t o 0, t he syst em del et es al l secondar y l i st s and

over wr i t es t he basi c l i st wi t h t he cur r ent secondar y l i st .

What are t he page header s f or secondary l i st s?On secondar y l i st s, t he syst em does not di spl ay a st andar dpage header and i t does not t r i gger t he event TOP- OF- PAGE. To cr eat e page headers f or secondary l i st , you must enhance TOP- OF- PAGE:

Synt ax TOP- OF- PAGE DURI NG LI NE- SELECTI ON. The syst emt r i gger s t hi s event f or each secondar y l i st . I f you want t ocreat e di f f er ent page header s f or di f f er ent l i st l evel s,

you must pr ogr am t he pr ocessi ng bl ock of t hi s eventaccor di ngl y, f or exampl e by usi ng syst em f i el ds such as SY-LSI ND or SY- PFKEY i n cont r ol st at ement s ( I F, CASE) .

Page 4: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 4/83

What i s meant by st acked l i st ?A St acked l i st i s not hi ng but secondar y l i st and i sdi spl ayed on a f ul l - si ze scr een unl ess you have speci f i edi t s coor di nat es usi ng t he wi ndow command.

I s t he basi c l i st del et ed when t he new l i st i s cr eat ed?NO. I t i s not del et ed and you can r et ur n back t o i t usi ngone of t he st andar d navi gat i on f unct i ons l i ke cl i cki ng ont he back but t on or t he cancel but t on.

What i s meant by hot spot s ?Hotspot i s a l i st area wher e t he mouse poi nt er appear s asan upr i ght hand symbol . When a user poi nt s t o t hat area( andt he hand cur sor i s act i ve) , a si ngl e- cl i ck does t he samet hi ng as a doubl e- cl i ck. Hot spot s ar e suppor t ed f r om R/ 3r el ease 3. 0c.

I n whi ch syst em f i el d does t he name of cur r ent gui st at usi s t her e ? The name of t he cur r ent GUI STATUS i s avai l abl e i n t hesyst em f i el d SY- PFKEY.

What i s meant by hi de ar ea ? The hi de command t emporar i l y st or es t he cont ents of t hef i el d at t he cur r ent l i ne i n a syst em- cont r ol l ed memor ycal l ed t he HI DE AREA. At an i nt er act i ve event , t he cont ent sof t he f i el d i s r est or ed f r om t he HI DE AREA. When cal l i ng asecondar y l i st f r om a l i st l i ne f or whi ch t he HI DE f i el ds

ar e st or ed, t he syst em f i l l s t he st or ed val ues back i nt ot he var i abl es i n t he pr ogr am. I n t he pr ogr am code, i nser tt he HI DE st atement di r ect l y af t er t he WRI TE st atement f ort he cur r ent l i ne.

When the get cur sor command used i n i nt er act i ve l i st s?I f t he hi dden i nf or mat i on i s not suf f i ci ent t o uni quel yi dent i f y t he sel ect ed l i ne, t he command GET CURSOR i s used. The GET CURSOR command r et urns t he name of t he f i el d at t hecur sor posi t i on i n a f i el d speci f i ed af t er t he addi t i onf i el d, and t he val ue of t he sel ected f i el d i n a f i el d

speci f i ed af t er val ue.

How t o pass dat a f r om l i st t o r epor t ?ABAP/ 4 pr ovi des t hr ee ways of passi ng data:- - - Passi ng dat a aut omat i cal l y usi ng syst em f i el ds- - - Usi ng st at ement s i n t he pr ogr am t o f et ch dat a- - - Passi ng l i st at t r i but es

Page 5: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 5/83

 How t o cal l ot her pr ogr ams ?

Repor t Tr ansact i onCal l and r et ur n SUBMI T AND RETURN CALL TRANSACTI ON

Cal l wi t hout r et urn SUBMI T LEAVE TO TRANSACTI ON

Syst em f i el ds used i n i nt er act i ve Repor t i ng The SY- LSI ND syst em f i el d cont ai ns t he i ndex of t he l i stcur r ent l y creat ed. Whi l e creat i ng a basi c l i st , SY- LSI NDequal s 0.

Wi t h each i nt er act i ve event , t he syst em aut omat i cal l y set st he f ol l owi ng system f i el ds:

Syst em f i el d I nf or mat i on

SY- LI NCT t ot al l i ne count of a l i st

SY- LI NNO cur r ent l i ne no wher e cur sor i s pl aced.

SY- LSI ND I ndex of t he l i st cur r ent l y cr eat ed dur i ng t hecur r ent event ( basi c l i st = 0)

SY- LI STI I ndex of t he l i st l evel f r om whi ch t he event wast r i gger ed

SY- LI LLI Absol ut e number of t he l i ne f r om whi ch t he event

was t r i gger ed

SY- LI SEL Cont ent s of t he l i ne f r om whi ch t he event wast r i gger ed

SY- CUROW Posi t i on of t he l i ne i n t he wi ndow f r om whi ch t heevent was t r i gger ed ( count i ng st ar t s wi t h 1)

SY- CUCOL Posi t i on of t he col umn i n t he wi ndow f r om whi cht he event was t r i gger ed ( count i ng st ar t s wi t h 2)

SY- UCOMM Funct i on code t hat t r i gger ed t he event

SY- PFKEY Al ways cont ai ns t he st at us of t he cur r ent l i st .

 TOP- OF- PAGE DURI NG LI NE- SELECTI ON.

 The syst em t r i gger s t hi s event f or each secondar y l i st . I fyou want t o cr eat e di f f er ent page header s f or di f f er ent

Page 6: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 6/83

l i st l evel s, you must pr ogr am t he pr ocessi ng bl ock of t hi sevent accor di ngl y, f or exampl e by usi ng syst em f i el ds suchas SY- LSI ND or SY- PFKEY i n cont r ol st at ement s ( I F, CASE) .

Dat a f r om Syst em Fi el ds of I nt er acti ve Li st s¬ 

Fr om syst em f i el ds, you r et r i eve t he f ol l owi ng i nf or mat i on:t he i ndex of a l i st , t he posi t i on of t he l i st i n t he out putwi ndow, and t he l ocat i on of t he cur sor . The onl y syst emf i el d t hat cont ai ns t he cont ent s of t he sel ect ed l i ne i sSY- LI SEL.

Passi ng Dat a by Pr ogr am St at ement s¬ 

 To pass i ndi vi dual out put f i el ds or addi t i onal i nf or mat i onf r om a l i ne t o t he cor r espondi ng pr ocessi ng bl ock dur i ng an

i nt er act i ve event , use these st at ement s:

HI DE The HI DE st at ement i s one of t he f undamental st at ements f ori nt er act i ve r epor t i ng. Usi ng t he HI DE t echni que, you can att he moment you cr eat e a l i st l evel def i ne, whi chi nf or mat i on l at er t o pass t o t he subsequent secondar yl i s t s .

Synt ax HI DE <f >.Eg HI DE: SPFLI - CARRI D, SPFLI - CONNI D, NUM.

READ LI NEUse t he st at ement s READ LI NE and READ CURRENT LI NE t oexpl i ci t l y r ead dat a f r om t he l i nes of exi st i ng l i stl evel s. These st at ement s are t i ght l y connect ed t o the HI DEt echni que.

Synt ax :

READ LI NE <l i n> [ I NDEX <i dx>][ FI ELD VALUE <f 1> [ I NTO <g 1>] . . . <f n> [ I NTO <g n>] ][ OF CURRENT PAGE| OF PAGE

] .

Eg :

READ LI NE SY- I NDEX FI ELD VALUE BOX.

Page 7: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 7/83

 

GET CURSOR

Use t he st at ement s GET CURSOR FI ELD and GET CURSOR LI NE t o

pass t he out put f i el d or out put l i ne on whi ch t he cur sorwas posi t i oned dur i ng t he i nt er act i ve event t o thepr ocessi ng bl ock.

SyntaxGET CURSOR FI ELD <f > [ OFFSET <of f >] [ LI NE <l i n>]

[ VALUE <val >] [ LENGTH <l en>] .

SET CURSOR

 To set t he cur sor , use t he SET CURSOR st at ement . Thi sst at ement sets t he cur sor i n t he most r ecent l y creat edl i st . Whi l e cr eat i ng t he basi c l i st , t hi s i s al ways t hebasi c l i st i t sel f . Whi l e creat i ng a secondary l i st , t hi s i st he pr evi ous l i st .

SET CURSOR <col > <l i n>.

 Thi s st at ement set s t he cur sor t o col umn <col > of l i ne<l i n> of t he out put wi ndow.

Cal l i ng Pr ogr ams

I f you need t o pr ogr am an ext ensi ve appl i cat i on, one si ngl epr ogr am wi l l become ver y compl ex. To make t he pr ogr ameasi er t o r ead, i t i s of t en r easonabl e t o di vi de t her equi r ed f unct i ons among sever al pr ogr ams.

ABAP al l ows you t o cal l r epor t s as wel l as t r ansact i onsusi ng t hese st at ement s:

Repor t Tr ansact i on

Cal l wi t hout r et urn SUBMI T LEAVE TO TRANSACTI ON

Cal l and r et ur n SUBMI T AND RETURN CALL TRANSACTI ON

Page 8: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 8/83

 Typi cal St r uct ur e of ABAP Pr ogram

1.   Repor t Def i ni t i ons *2.

 

 Tabl e and Dat a def i ni t i ons *3.   I ni t i al i zat i on event

4. 

Scr een Sel ect Opt i ons/ I nput s *

5. Sel ect i on- scr een event

6. St ar t - of - sel ecti on event

7. Per f orms and ot her Event s *

st at ement s

8. End- of - sel ect i on event

1. 

I ni t i al i zat i on

• Tr i gger ed pr i or t o f i r st di spl ay of sel ect i on screen

• To speci f y Def aul t val ue i n SELECT- OPTI ONS

2. At Sel ect i on- Scr een

• Pr ocessed af t er t he sel ect i on scr een val ue ar e ent er ed

• For val i dat i on of scr een accept s

• Ret urns back t o SELECT- OPTI ONS

4. START- OF- SELECTI ON & END- OF- SELECTI ON

• Thi s i s i mpl i ci t i n any ABAP/ 4 pr ogr am

• St ar t & end of mai n pr ocessi ng l ogi c

• Mor e i n use wi t h l ogi cal dat abase access

• Al l St at ements between START- OF- SELECTI ON and END- OF-ELECTI ON i s onl y execut ed

• By Def aul t , no need t o have END- OF- SELECTI ON

• Each procedural st at ement i n an ABAP pr ogr amaut omat i cal l y bel ongs t o START- OF- SELECTI ON

Page 9: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 9/83

5.   For m Event

• Si mi l ar t o PERFORM/ SUBROUTI NES

• STARTS wi t h FORM and ends wi t h ENDFORM

• Al l st at ement s between ENDFORM and end of pr ogr am arenever pr ocessed

• Si mi l ar l y al l st at ement s bet ween ENDFORM and eventkeyword ar e never pr ocessed.

6. 

Li mi t at i ons of Si mpl e PERFORM

• Val ues can be passed through PERFORM t o FORM.

• Gi vi ng t he f l exi bi l i t y t o use the same subr out i nemul t i pl e number of t i mes.

Synt ax1: PERFORM <XXXX> usi ng <YYY>

changi ng <MMM>

FORM <XXXX> usi ng <YYY> l i ke <ZZZ>

changi ng <MMM> l i ke <NNN> - Pass by r ef er ence

OR

FORM <XXXX> usi ng val ue ( YYY) l i ke <ZZZ> - Pass by val ue,cr eat es anot her copy of t he var i abl e.

Exampl e1:PERFORM dat e- i nver t usi ng i n- dat eChangi ng out - dat e

FORM dat e- i nver t usi ng i n- dat e l i ke dat um

Synt ax2: PERFORM f unct i on- name( progr am) I F FOUND.

Exampl e2: PERFORM HEADER( FORMPOOL) I F FOUND.

6.  Get event

• GET < t abl e name >

Page 10: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 10/83

• Reads dat a of al l col umns f r om al l dat abase t abl ef al l i ng i n t he hi er ar chy

• Needs t o ment i on t abl e name i n

 TABLES: paramet er s………

• Onl y f i el ds par t of t he t abl es ment i oned i n t he TABLES:par amet er can be vi ewed & edi t ed

7.   To Exi t f r om an Event

• Exi t – I t exi t s f r om t he r espect i ve subr out i ne wer et hi s synt ax i s used , gener al l y condi t i on f or t he EXI T i sst at ed bef or e t hi s synt ax

• Check - her e t he condi t i onal check i s done at t he samet i me .

CHECK <condi t i on>

i f t he condi t i on i s not sat i sf i ed, t he syst em l eaves t hesubr out i ne and resumes t he pr ocessi ng af t er t he PERFORMst at ement

• St op – i t i s t he abr upt st oppi ng t he pr ogr am f l ow

8.  CALLi ng Funct i onal Modul es

Synt ax:CALL FUNCTI ON <modul e>

[ EXPORTI NG f 1 = a1 . . . . f n = an]

[ I MPORTI NG f 1 = a1 . . . . f n = an]

[ CHANGI NG f 1 = a1 . . . . f n = an]

[ TABLES f 1 = a1 . . . . f n = an]

[ EXCEPTI ONS e1 = r 1 . . . . en = r n

Exampl e:CALL FUNCTI ON ' Z_DATE_CONVERSI ON'

EXPORTI NG STD_DATE = GEN_DATE

Page 11: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 11/83

I MPORTI NG CH_DATE = NEW_DATE

9.  Li st Event s

 TOP- Of - PAGE, END- OF- PAGE,

AT LI NE- SELECTI ON, AT USER- COMMAND

 These event s ar e t r i gger ed by t he ABAP r unt i meenvi r onment whi l e a l i st i s bei ng cr eat ed or when a userper f or ms an act i on on a l i st . The st at ement i n t hesebl ocks can f or mat t he l i st or pr ocess t he user ’ s r equest .

ABAP PERFORMANCE I SSUES.

ABAP/ 4 Opt i mi zat i on

• Use t he GET RUN TI ME command t o hel p eval uat eper f or mance. I t ' s har d t o know whet her t hat opt i mi zat i ont echni que REALLY hel ps unl ess you t est i t out . Usi ng t hi st ool can hel p you know what i s ef f ect i ve, under whatki nds of condi t i ons. The GET RUN TI ME has pr obl ems undermul t i pl e CPUs, so you shoul d use i t t o t est smal l pi ecesof your pr ogr am, r at her t han t he whol e pr ogr am.

• Avoi d ' SELECT *' , especi al l y i n t abl es t hat have a l otof f i el ds. Use SELECT A B C I NTO i nst ead, so t hat f i el ds

are onl y read i f t hey ar e used. Thi s can make a ver y bi gdi f f er ence.

• Fi el d- gr oups can be usef ul f or mul t i - l evel sor t i ng anddi spl ayi ng. However , t hey wr i t e t hei r dat a t o t hesyst em' s pagi ng space, r ather t han t o memory ( i nt er nalt abl es use memor y) . For t hi s r eason, f i el d- gr oups areonl y appr opr i at e f or pr ocessi ng l ar ge l i st s ( e. g. over50, 000 r ecor ds) . I f you have l ar ge l i st s, you shoul d wor kwi t h t he syst ems admi ni st r at or t o deci de the maxi mumamount of RAM your pr ogr am shoul d use, and f r om t hat ,

cal cul ate how much space your l i st s wi l l use. Then youcan deci de whet her t o wr i t e t he dat a t o memory or swapspace. See t he Fi el d gr oups ABAP exampl e.

• Use as many t abl e keys as poss i bl e i n t he WHERE par t ofyour sel ect st at ement s.

Page 12: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 12/83

• Whenever possi bl e, desi gn t he pr ogr am t o access ar el at i vel y const ant number of r ecor ds ( f or i nst ance, i fyou onl y access t he t r ansact i ons f or one mont h, t hent her e pr obabl y wi l l be a r easonabl e r ange, l i ke 1200-1800, f or t he number of t r ansact i ons i nput t ed wi t hi n t hat

mont h) . Then use a SELECT A B C I NTO TABLE I TABst atement .

• Get a good i dea of how many r ecords you wi l l beaccessi ng. Log i nt o your pr oduct i ve syst em, and use SE80- > Di ct i onar y Obj ect s ( pr ess Edi t ) , ent er t he t abl e nameyou want t o see, and pr ess Di spl ay. Go To Ut i l i t i es - > Tabl e Cont ents t o quer y t he t abl e cont ents and see t henumber of r ecor ds. Thi s i s ext r emel y usef ul i n opt i mi zi nga pr ogr am' s memory al l ocat i on.

• Tr y to make t he user i nt er f ace such t hat t he pr ogr amgr adual l y unf ol ds mor e i nf or mat i on t o t he user , r at her t hangi vi ng a huge l i st of i nf or mat i on al l at once t o t he user .

• Decl are your i nt ernal t abl es usi ng OCCURS NUM_RECS, wher eNUM_RECS i s t he number of r ecor ds you expect t o beaccessi ng. I f t he number of r ecor ds exceeds NUM_RECS, t hedat a wi l l be kept i n swap space (not memory) .

• Use SELECT A B C I NTO TABLE I TAB whenever possi bl e. Thi swi l l r ead al l of t he r ecor ds i nt o t he i t ab i n oneoper at i on, r at her t han r epeat ed oper at i ons t hat r esul t f r oma SELECT A B C I NTO I TAB. . . ENDSELECT st at ement . Make sur et hat I TAB i s decl ar ed wi t h OCCURS NUM_RECS, where NUM_RECSi s t he number of r ecords you expect t o access.

• Many t abl es cont ai n t ot al s f i el ds ( such as mont hl yexpense t ot al s) . Use t hese avoi d wast i ng resour ces bycal cul at i ng a t ot al t hat has al r eady been cal cul at ed andst or ed.

• Pr ogr am Anal ysi s Ut i l i t y To deter mi ne t he usage of var i abl es and subr out i nes wi t hi na pr ogr am, you can use t he ABAP ut i l i t y cal l ed ‘ Pr ogr amAnal ysi s’ i ncl uded i n t r ansact i on SE38. To do so, execut et r ansact i on SE38, ent er your pr ogr am name, t hen use t hepat h Ut i l i t i es - > Pr ogr am Anal ysi s

Page 13: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 13/83

 ABAP PERFORMANCE I MPROVEMENTS VI A DATA DI CTI ONARY

• I NDEX CREATI ON SUGGESTI ONS RELATED TO DATABASEPERFORMANCE

• The col umns at t he begi nni ng of an i ndex are t he most“common”. The most “common” col umns ar e t hose where repor t sare sel ect i ng col umns wi t h no r anges - t he wher e cl ause f ort hese col umns i s an “equal t o” expr essi on. Rearr angecol umns of an i ndex to mat ch t he sel ect i on cr i t er i a. Forexampl e, i f a sel ect st at ement i s wr i t t en t o i ncl udecol umns 1 and 2 wi t h “equal t o” expr essi ons i n t he wherecl ause and col umn 3 and 4 are sel ect ed wi t h val ue ranges,t hen the i ndex shoul d be created wi t h col umns i n t hesequence of 1, 2, 3, 4.

• Col umns t owards t he end of t he i ndex are ei t heri nf r equent l y used i n sel ect s or ar e par t of r epor t i ngsel ect s t hat i nvol ve r anges of val ues.

• TABLE TYPE SUGGESTI ONS RELATED TO DATABASE PERFORMANCE

• Use VI EW t abl es t o ef f ect i vel y j oi n and “denor mal i ze”r el at ed t abl es t hat ar e taki ng l ar ge amount s of t i me tosel ect f or r epor t i ng. For exampl e, at t i mes wher e hi ghl yaccessed t abl es nor mal i ze descr i pt i on t ext i nt o one t abl e

and the header dat a i nto anot her t abl e, i t may make senset o creat e a vi ew t abl e t hat j oi ns t he r el evant f i el ds oft he t wo associ at ed wi t h a poor per f ormi ng ABAP.

• For POOL t abl es t hat cont ai n l arge amount s of dat a andar e hi ghl y accessed, conver t t he pool ed t abl e i nt o at r anspar ent t abl e and add an i ndex. POOLED t abl es aresupposed t o be col l ect i ons of smal l er t abl es t hat ar equi ckl y accessed f r om t he dat abase or ar e compl et el ybuf f ered i n memory. Pool ed t abl es cont ai ni ng more t han af ew hundr ed r ows and ar e accessed many t i mes i n a repor t or

t r ansact i on are candi dat es f or POOL t o TRANSPARENTConver si on. For exampl e, t abl e A053 cont ai ns t ax j ur i sdi ct i on condi t i on i nf or mat i on and ar e accessed mor et han t en t i mes i n t he sal es or der cr eat e t r ansact i on. I ft he ent i r e Uni t ed St ates t ax codes are l oaded i nt o t hesecondi t i on t abl es, t he t i me t o save a sal es or der i ncr easest o unaccept abl e l evel s. Conver t i ng t he t ax condi t i on t abl e

Page 14: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 14/83

t o t r anspar ent and cr eat i ng an i ndex based upon t he keyf i el ds, decr eases pr ocessi ng t i me f r om mi nut es t o seconds.

• Do not al l ow t he use of LI KE i n an SAP SQL st at ementaccessi ng a l ar ge t abl e.

• Use i nt er nal t abl es i n ABAPs t o pr esel ect val ues once andst ore val ues i n memory f or sor t i ng and sear chi ng pur poses( t hi s i s an assumpt i on st at ed at t he begi nni ng of t hi sdi scussi on) .

• Avoi d l ogi cal dat abases when not pr ocessi ng al l r ow s ofa t abl e. I n f act , a l ogi cal dat abase i s mer el y a gr oup ofnest ed SAP SQL SELECT st at ement s. I n general , whenpr ocessi ng a smal l number of r ows i n a l ar ger t abl e i sr equi r ed, t he use of i nt er nal t abl es and NOT usi ng al ogi cal dat abase or nest ed sel ect s wi l l be much bet t er f orper f ormance.

ABAP I MPORTANT REPORTS

• RSBDCBTC

Submi t a BDC j ob wi t h an i nt ernal bat ch number and wai t f ort he end of t he bat ch i nput sessi on.

• RSBDCSUBRel ease bat ch i nput sessi ons aut omat i cal l y

ABAP I MPORTANT TCODES

OSS1 SAP Onl i ne Servi ce Syst emSM13 Updat e moni t or . Wi l l show updat e t asks st at us. Veryusef ul t o determi ne why anupdat e f ai l ed.S001 ABAP Devel opment Wor kbenchSE01 Ol d Tr anspor t & Corr ect i ons scr eenSE10 New Transpor t & Cor r ect i on scr eenSE09 Wor kbench Or gani zer

SE16 Dat a Br owser : I ni t i al Scr een.SE30 ABAP/ 4 Runt i me Anal ysi sSE36 ABAP/ 4: Logi cal Dat abasesSE37 ABAP/ 4 Funct i on Modul esSE38 ABAP Edi t orSE39 Spl i t scr een Edi t or : Pr ogr am Compar eSE41 Menu Pai nt erSE51 Screen Pai nt er : I ni t i al Screen.

Page 15: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 15/83

SE71 SAPscr i pt l ayout setSE80 ABAP/ 4 Devel opment Wor kbench Obj ect Br owserSM12 Lock t abl e ent r i es ( unl ock l ocked t abl es)SM21 Vi ew t he syst em l og, ver y usef ul when you get a shor tdump. Pr ovi des much

mor e i nf o t han shor t dumpSM35 Vi ew Bat ch I nput Sess i onsSQ00 ABAP/ 4 Quer y: Star t Quer i es

Page 16: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 16/83

Page 17: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 17/83

• OPEN DTASET <dat aset name> f or <i nput out put appendi ng>i n <bi nary t ext > mode at POSI TI ON <posi t i on> MESSAGE<f i el d>• READ DATASET <dat aset name > I NTO <f i el d>• CLOSE DATASET <dat aset name>

• DELETE DATASET <dat aset name> TRANSFER <f i el d> t o <dat aset name>

7 What i s t he pr ocess f or t r ansf er r i ng dat a f r om l egacysyst em t o SAP?

Ans : - FTP f i l e t r ansf er , Manuf actur er –speci f i c f i el dt r ansf er NFS( net wor k f i l e syst em) / BDC.

8 Expl ai n t he pr ocess t o t r ansf er a recor d t o a dat aset ?Ans : - TRANSFER <f i el d> t o <dat aset name>.

9 Why bat ch i nput ?Ans : - To i nput a l ar ge amount of i nf or mat i on at of f peakt i mes.

10 Can data be put di r ect l y i nt o t he database?Ans : - No, onl y af t er t he dat a has been ent er ed vi at r ansacti on.

11 Expl ai n at hi gh l evel , t he bat ch i nput pr ocess?

Ans : - Bat ch dat a i s pl aced i nt o queues cal l ed batchi nput sessi ons , t hen pl aced i nt o t he appl i cat i onpr ogr ams f or mai nt enance i nt o t he dat abase.

12 What are t he f unct i on modul es associ at ed wi t h bat ch

i nput ?Ans : - BDC_OPEN_GROUP , BDC_CLOSE_GROUP , BDC_I NSERT

13 What i s t he st r uct ur e of t he BDC t abl e?Ans : - Pr ogr am/ Dynpr o/ st ar t / f i el d name/ f i el d cont ent .

14 Wr i t e out a codi ng exampl e f or f i l l i ng a BDC Tabl e.Ans : -

Page 18: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 18/83

FORM <NAME>REFEESH <bdc t abl e>CLEAR <bdc t abl e>MOVE <pr ogr am name > t o <bdc t abl e>- PROGRAM<number 1> TO <bdc t abl e>- DYNPRO

‘ X’ TO <bdc t abl e>- DYNBEGI NAPPEND <bdc t abl e>CLEAR <bdc t abl e>MOVE: <f i el d1> TO <bdc t abl e>- FNAM<f i el d2> TO <bdc t abl e>- FVALAPPEND <bdc t abl e>

15 How do you f i nd t he t r ansact i on number , progr am numberand f i el d names?Ans : -• Tr ansact i on no. , pr ogr am no. – Syst em - > st at usFi el d names - F1, Techni cal hel p

16 What are t he pr ocess i ng modes f or Bat ch I nput ?Ans : - Pr ocess on scr een( f or egr ound) , Di spl ay er r or sonl y and pr ocess i n t he backgr ound

17 What are the avai l abl e OK Codes t hat can be ut i l i zeddur i ng bat ch i nput pr ocessi ng?Ans : -

• / n – t er mi nat es cur r ent bat ch i nput t r ansact i on andmar ks as i ncor r ect .• / bdel – del et e cur r ent bat ch i nput t r ansact i on f r omsessi on.• / bend – t ermi nat e bat ch i nput pr ocessi ng and marksessi on as i ncor r ect .• / bda – change di spl ay mode to pr ocess t he sessi on onscr een i nst ead of di spl ayi ng onl y er r or s./ bde – change di spl ay mode to di spl ay onl y er r or s i nst eadof pr ocessi ng t he sessi on on t he scr een.

18 What i s t he ef f ect of t he BDC_CURSOR f i el d name i n t heBDC t abl e?Ans : - You can set t he cur sor and ent er as acor r espondi ng f i el d val ue t he name of t he f i el d on whi cht he cur sor i s t o be posi t i oned .

Page 19: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 19/83

19 How many t ypes of BDCs you have done?

21 Why you choose Cal l t r ansact i on and/ or sessi on method?

Cal l t r ansact i on i s mai nl y used when you want t o updat e

t he dat abase usi ng a si ngl e t r ansact i on , you can al soupdat e the dat abase i n asynchr onous mode, wher e assessi on i s used t o per f or m huge dat abase updat i ons usi ngmor e t han one t r ansact i on and whi ch wi l l l ast f or a l ongt i me.

22 How you t r ap er r or s i n cal l Tr ansact i on

Er r or s whi l e updat i ng t he dat abase usi ng cal l t r ansact i ont echni que are t r apped usi ng a st r uct ur e bdcmsgcal l , whosef i el d msgt yp become ‘ e’ when an er r or r ecord i sencount er ed. Those r ecor ds ar e f ormat t ed usi ngf or mat _message f unct i on cal l i n t he desi r ed f or mat andst or ed i n an i nt er nal t abl e f or l i st i ng of al l er r orr ecor ds i n one shot .

23 What are di f f erent t ypes of Updat e modesI n BDC’ s we have t wo t ypes of updat i on modes – 1)Synchr onous 2) Asynchronous

24 What i s mai n di f f erence bet ween sessi on met hod andLSMW

I n the cont ext of sessi on met hod, t he met hod of updat i ngi s “Bat ch I nput ” , we r equi r e a pr ogr am t o be coded,But i n the cont ext of LSMW met hod, The met hods ofupdat i ng usi ng “Bat ch I nput / Di r ect i on I nput ”f r om an I DOC, f r om a BAPI st r uct ur e. No sour ce code i sr equi r ed, t he compl et e oper at i on i s per f or med i n 16 st epssequence

25 What i s mai n di f f er ence bet ween CATT and LSMW

Usi ng LSMW you can updat e any ki nd of dat a but no changest o dat abase ar e al l owed, where as CATT t ool can updat eonl y mast er data, whi ch al so al l ows changes t o t he mast erdat a and al so a si gni f i cant t est i ng of dat a i s possi bl e

Page 20: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 20/83

26 What i s BDC and How you use i t ?BC Basi s Component s- - ABAP wor kbench- - BC Basi s Pr ogr ammi ngi nt er f aces- - Dat a t r ansf er

Dur i ng dat a t r ansf er , dat a i s t r ansf er r ed f r om an

ext er nal syst em i nt o t he SAP R/ 3 Syst em. •Tr ansf er dat af rom an ext ernal system i nt o an R/ 3 System as i t i si nst al l ed. •Tr ansf er dat a r egul ar l y f r om an ext er nalsyst em i nt o an R/ 3 Syst em.

Exampl e: I f dat a f or some depar t ment s i n your company i si nput usi ng a syst em ot her t han t he R/ 3 Syst em, you canst i l l i nt egr at e t hi s dat a i n t he R/ 3 Syst em. To do t hi s,you expor t t he dat a f r om t he ext er nal syst em and use adat a t r ansf er met hod t o i mpor t i t i nt o the R/ 3 Syst em.Batch i nput wi t h bat ch i nput sessi ons : Dat a consi st encycheck wi t h t he hel p of scr een l ogi c.

Wi t h t he bat ch i nput method, an ABAP pr ogr am r eads t heexter nal dat a t hat i s t o be ent er ed i n t he R/ 3 Syst em andst or es t he dat a i n a "bat ch i nput sessi on" . The sessi onr ecor ds t he act i ons t hat ar e requi r ed t o t r ansf er dat ai nt o t he syst em usi ng nor mal SAP t r ansact i ons.

When t he pr ogr am has generat ed t he sessi on, you can runt he sessi on t o execut e t he SAP t r ansact i ons i n i t . Youcan expl i ci t l y st ar t and moni t or a sessi on wi t h t he bat chi nput management f unct i on ( by choosi ng Syst em ® Ser vi ces

® Bat ch i nput ) , or have t he sessi on r un i n t he backgr oundpr ocessi ng syst em.

Use t he BDC_OPEN_GROUP f unct i on modul e t o cr eat e a newsessi on. Once you have creat ed a sessi on, t hen you cani nser t bat ch i nput dat a i nt o i t wi t h BDC_I NSERT. Use t heBDC_I NSERT f unct i on modul e t o add a t r ansact i on t o abat ch i nput sessi on. Use t he BDC_CLOSE_GROUP f unct i onmodul e t o cl ose a sessi on af t er you have i nser t ed al l ofyour bat ch i nput dat a i nt o i t .

What i s Dat aset and how you use i t ?ABAP/ 4 pr ovi des t hr ee st at ement s f or handl i ng f i l es:

 The OPEN DATASET st at ement opens a f i l e. The CLOSE DATASET st at ement cl oses a f i l e. The DELETE DATASET st at ement del et es a f i l e.

Page 21: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 21/83

 To open a f i l e f or r ead access , use t he FOR I NPUT opt i onof t he OPEN DATASET st at ement

 To open a f i l e f or wr i t e access , use t he FOR OUTPUTopt i on of t he OPEN DATASET st at ement

 To open a f i l e f or appendi ng dat a t o t he f i l e, use t heFOR APPENDI NG opt i on of t he OPEN DATASET st at ement

 To process a f i l e i n bi nary mode, use t he I N BI NARY MODEopt i on of t he OPEN DATASET st at ement

 To process a f i l e i n t ext mode, use t he I N TEXT MODEopt i on of t he OPEN DATASET st at ement

 To open a f i l e at a speci f i c posi t i on, use t he ATPOSI TI ON opt i on of t he OPEN DATASET st at ement

When you wor k wi t h t he operat i ng syst ems UNI X or WI NDOWSNT, you can send an operat i ng syst em command wi t h t hest at ement OPEN DATASET. To do so, use t he opt i on FI LTER

 To r ecei ve t he oper at i ng syst em message af t er t r yi ng t oopen a f i l e, use t he MESSAGE opt i on of t he OPEN DATASETst at ement

 To cl ose a f i l e on t he appl i cat i on ser ver , use t he CLOSEDATASET st at ement

 To del et e a f i l e on t he appl i cat i on ser ver , use t heDELETE DATASET st at ement

 To wr i t e dat a t o a f i l e on t he appl i cat i on ser ver , uset he TRANSFER st at ement

 To r ead dat a f r om a f i l e on t he appl i cat i on ser ver , uset he READ DATASET st at ement .

36 Gi ve r eal t i me work done by u i n BDC ? Tr ansact i onsused ? par amet er s passed wi t h f unct i ons.

Page 22: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 22/83

 

37 wi l l ask u f or scr een no' s and dynpr o names f or BDCt hat u say u have done.

39 Whi ch t echni cal f i el d i n t he BDCDATA t abl e hol ds t hel ast cur sor posi t i on?

41 What i s t r ue about t he LSMW: ( choose cor r ect opt i on/ s)• Par t of t he SAP syst em• Pr ocesses hi er ar chi cal dat a f i l es ( header and posi t i on)• Needs a sour ce f i el d f or ever y t ar get f i el d

44 How do you r ead a LOCAL sequent i al f i l e?

45 How do you wr i t e a sequent i al f i l e?

46 How do you send t he BDCDATA t abl e i n a Cal l Tr ansact i on st at ement?

47 What l oop do you code f or a READ DATASET st at ement ?

51 What are t he st eps i n a BDC sessi on ?

 The f i r st st ep i n a BDC sess i on i s t o i dent i f y t hescr eens of t he t r ansact i on t hat t he pr ogr am wi l l pr ocess.Next st ep i s t o wr i t e a pr ogr am t o bui l d t he BDC t abl et hat wi l l be used t o submi t t he dat a to SAP. The f i nalst ep i s t o submi t t he BDC t abl e t o t he syst em i n t hebat ch mode or as a si ngl e t r ansact i on by t he CALL TRANSACTI ON command.

52 How do you f i nd t he i nf ormat i on on t he cur r ent scr een

?- St at us command◊ The i nf or mat i on on t he cur r ent scr eencan be f ound by Syst em f r om any menu.

53 How do you save data i n BDC t abl es ?- The data i n BDC t abl es i s saved by usi ng the f i el d name‘ BDC_OKCODE’ and f i el d val ue of ‘ / 11’54 What i s t he l ast ent r y i n al l BDC t abl es ?

Page 23: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 23/83

- I n al l BDC t abl es, t he l ast ent r y i s t o save t he dat aby usi ng t he f i el d name BDC_OKCODE and a f i el d val ue of‘ / 11’ .

55 What i s a mul t i pl e l i ne f i el d ?- A mul t i pl e l i ne f i el d i s a speci al ki nd of f i el d whi chal l ows t he user t o ent er mul t i pl e l i nes of dat a i nt o i t .

56 How do you popul at e dat a i nt o a mul t i pl e l i ne f i el d ?- To popul at e dat a i nt o a mul t i pl e l i ne f i el d, an i ndexi s added t o t he f i el d name t o i ndi cat e whi ch l i ne i s t obe popul ated by t he BDC sessi on ( Li ne i ndex ) .

57 Wr i t e t he BDC t abl e st r uct ur e.

- BDC t abl e st r uct ur e

FI ELD TYPE DESCRI PTI ONProgr am CHAR( 8) Progr am name of t r ansact i onDynPro CHAR( 4) Screen number of t r ansact i onDynBegi n CHAR( 1) I ndi cat or f or new scr eenFnam CHAR( 35) Name of dat abase f i el d f r omScr eenFval CHAR( 80) Val ue to submi t t o f i el d

58 Does t he CALL TRANSACTI ON met hod al l ow mul t i pl et r ansact i ons t o be pr ocessed by SAP ?

- No. The CALL TRANSACTI ON met hod al l ows onl y a si ngl et r ansact i on t o be pr ocessed by SAP.

59 Does t he BDC_I NSERT f unct i on al l ow mul t i pl et r ansact i ons t o be pr ocessed by SAP ?- Yes.

60 What i s t he synt ax f or ‘ CALL TRANSACTI ON’ ?- CALL TRANSACTI ON t r ans [ usi ng bdct ab MODE mode ] . Three possi bl e ent r i es ar e t here f or MODE.A - show al l scr eens

E - show onl y screens wi t h er r or sN - show no scr eens

Whi ch mode of ‘ CALL TRANSACTI ON’ met hod al l ows backgr oundpr ocessi ng ?- N i s t he onl y mode t hat al l ows backgr ound pr ocessi ng.

Page 24: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 24/83

61 I s i t possi bl e to use ‘ CALL TRANSACTI ON’ wi t hout a BDCt abl e ?- Yes, i t i s possi bl e t o use ‘ CALL TRANSACTI ON’ wi t hout aBDC t abl e. I n such case, t he cur r ent pr ogr am i ssuspended, t he t r ansact i on speci f i ed i s br ought up, and a

user must ent er t he dat a i nt o the scr eens.

62 What i s TCODE ?- TCODE i s t he t r ansact i on code f or t he t r ansact i on t hatshoul d be used t o pr ocess t he dat a i n t he BDC t abl e bei ngi nser t ed.63 What are the f unct i on modul es t hat need to be cal l edf r om BDC pr ogr am t o submi t t he t r ansact i ons f orpr ocessi ng ?- BDC_OPEN_GROUP- BDC_I NSERT- BDC_CLOSE_GROUP

64 How many sessi ons wi l l be opened usi ng BDC_OPEN_GROUP?- Onl y one sessi on can be created usi ng t heBDC_OPEN_GROUP f unct on.

65 What i s ‘ BATCH I NPUT’ or ‘ BDC’ ?

- The SAP syst em of f ers t wo pr i mary met hods ( BDC SESSI ONMETHOD, CALL TRANSACTI ON METHOD) f or t r ansf er r i ng dat ai nt o t he syst em f r om other syst ems and Non- SAP syst ems.

 These t wo met hods ar e col l ect i vel y cal l ed as ‘ BATCHI NPUT’ or ‘ Bat ch Dat a Communi cat i on’ ( BDC) .

66 What are t he advant ages i n Bat ch I nput ?

- The Bat ch I nput ensur es Dat a i nt egr i t y.No manual i nt er act i on i s r equi r ed dur i ng Dat a t r ansf er .

67 What i s t he f unct i onal i t y of ‘ Cl assi cal Bat ch I nput ’ ?

I n ‘ Cl assi cal Bat ch I nput ’ an ABAP/ 4 pr ogr am r eads t heext er nal dat a t hat i s t o be ent er ed i n t he SAP syst em andst or es t he dat a i n a Bat ch I nput sessi on. Thi s sessi onst or es t he act i ons t hat ar e r equi r ed t o ent er your dat ausi ng nor mal SAP t r ansact i ons.

Page 25: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 25/83

68 Whi ch Funct i on Modul es are used i n ‘ Cl assi cal BatchI nput ’ ?- BDC_OPEN_GROUP , BDC_I NSERT, BDC_CLOSE_GROUP.

69 What i s Synchr onous Dat abase updat e ?

- Dur i ng t he pr ocessi ng no t r ansact i on i s st or ed unt i lt he pr evi ous t r ansact i on has been wr i t t en t o t heDat abase. Thi s i s cal l ed Synchr onous Database update.

70 What ar e t he di f f er ences between CALL TRANSACTI ON andBATCH I NPUT SESSI ON ?

- The most i mport ant aspect s of t he batch sessi oni nt er f ace ar e:- Asynchr onous pr ocessi ng- Tr ansf er s dat a f or mul t i pl e t r ansact i ons- Synchr onous dat abase updat eDur i ng pr ocessi ng, no t r ansact i on i s st ar t ed unt i l t hepr evi ous t r ansact i on has been wr i t t en t o t he dat abase.- A bat ch i nput pr ocessi ng l og i s gener at ed f or eachsessi on- Sessi ons cannot be gener at ed i n par al l el

 The most i mpor t ant aspect s of t he CALL TRANSACTI ON USI NGi nt er f ace ar e:- Synchr onous pr ocessi ng- Tr ansf er s dat a f or a si ngl e t r ansact i on

- Synchr onous and asynchr onous dat abase updat i ng bot hpossi bl e The program speci f i es whi ch ki nd of updat i ng i s desi r ed.- Separ at e LUW f or t he t r ansact i on The syst em perf or ms a dat abase commi t i mmedi at el y bef or eand af t er t he CALL TRANSACTI ON USI NG st at ement .- No bat ch i nput pr ocessi ng l og i s gener at ed

71 What are the types of Bat ch I nput ?- Cl assi cal Bat ch I nput- Cal l Tr ansact i on

- Cal l Di al og

72 What i s BDC_OKCODE ?- The command f i el d i s i dent i f i ed by a speci al name i nbat ch i nput cal l ed BDC_OKCODE. Thi s name i s const ant andal ways i dent i f i es t he command f i el d.

Page 26: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 26/83

73 How can we execute a f unct i on i n a BDC sessi on ?- We can execut e a f unct i on i n a t r ansact i on by ent er i ngt he f unct i on code or f unct i on key number i n t he commandf i el d of an SAP sessi on. A f unct i on key number must bepr ef i xed wi t h t he / ( sl ash) char act er . A f unct i on code

must be pr ef i xed wi t h t he = character .- Exampl e: BDCDATA- FNAM = ' BDC_OKCODE'BDCDATA- FVAL = ' =UPDA'

74 How can we posi t i on t he cur sor on a par t i cul ar f i el d ?- BDCDATA- FNAM = ‘ BDC_CURSOR’BDCDATA- FVAL = <FI ELDNAME>

75 Who ar e Di al og users and who ar e Background users ?- Di al og user s are nor mal i nt er act i ve user s i n t he SAPsyst em. Backgr ound user s ar e user mast er r ecor ds t hat arespeci al l y def i ned f or pr ovi di ng aut hor i zat i ons f orbackgr ound pr ocessi ng j obs.

76 What i s t he use of BDC_I NSERT ?- We add a t r ansact i on t o a Batch I nput Sessi on by usi ngt hi s f unct i on.77 What ar e t he updat e modes i n CALL TRANSACTI ON ?- S : Synchr onous- A : Asynchr nous- L : Local78 What does t he message par amet er i ndi cat es ?- The message paramet er i ndi cates t her e al l syst em

messages i ssued dur i ng a CALL TRANSACTI ON ar e wr i t t eni nt o t he i nt er nal t abl e <i t ab>. The i nt er nal t abl e musthave t he st r uct ure of BDCMSGCOLL.

79 What i s Di r ect I nput ?- To enhance t he bat ch i nput pr ocedur e, t he syst em of f er st he di r ect i nput t echni que especi al l y f or t r ansf er r i ngl ar ge amount of dat a. Thi s t echni que doesn’ t cr eat esessi ons but st or es t he dat a di r ect l y. The di r ect i nputprogr ams must be execut ed i n t he back ground onl y. Tomai ntai n and st ar t t hese pr ogr ams, use pr ogr am RBMVSHOW

or t he t r ansact i on BMVO.

80 What are t he f eatur es of Recordi ng Funct i on ?- r ecor di ng t r ansact i on r uns- cr eat i ng bat ch i nput sessi ons f r om t he r ecor dedt r ansact i on r uns.- Gener at i ng a bat ch i nput pr ogr am f r om t he recor deddat a.

Page 27: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 27/83

 81 What i s synchrnous database updat e ?- Dur i ng t he pr ocessi ng, no t r ansact i on i s st or ed unt i lt he pr evi ous t r ansact i on has been wr i t t en t o t hedat abase. Thi s i s cal l ed Synchr onous dat abase updat e.

82 How do you set up batch process?Dat a anal ysi s: Anal yze t he dat a t hat i s t o be t r ansf er r edt o t he SAP Syst em.| |Gener ate SAP st r uct ur es: Gener ate SAP data st r uct ur es f ori ncor por at i on i nt o your dat a expor t pr ogr am.| |Devel op t r ansf er pr ogr am: You can wr i t e t he pr ogr am i nABAP/ 4 or as an ext ernal pr ogr am.| |Cr eat e sequent i al f i l e: Expor t t he dat a t hat i s t o bet r ansf er r ed, t o a sequent i al f i l e.| |Cr eat e bat ch i nput pr ogr am: ABAP/ 4 bat ch i nput pr ogr amt hat wi l l r ead t he dat a t o be t r ansf er r ed f r om t hesequent i al f i l e.| |Pr ocess bat ch i nput dat a: Pr ocess t he dat a and add i t t ot he SAP Syst em. You can do t hi s ei t her by:bat ch- i nput sessi on met hod or Cal l t r ansact i on met hod.| |Anal yse r esul t s: Check that al l dat a has been

successf ul l y pr ocessed.| |Anal yse Er r or sessi on: Cor r ect and r e- pr ocess err oneousdat a.

83 Wher e do you use BDC?• t r ansf er r i ng dat a f r om anot her syst em when you i nst al lyour SAP Syst em• r egul ar l y t r ansf er r i ng dat a t hat i s capt ur ed by a non-SAP syst em i n your company i nto t he SAP Syst em. Assume,f or exampl e, t hat dat a col l ect i on i n some areas of your

company i s s t i l l per f ormed by a non- SAP syst em. You canst i l l consol i dat e al l of your dat a i n t he SAP Syst em byexpor t i ng t he dat a f r om t he ot her syst em and r eadi ng i ti nt o t he SAP Syst em wi t h bat ch i nput .

 You can al so use bat ch i nput t o t r ansf er dat a between t woR/ 3 Syst ems. However , t here ar e more di r ect methods f ordoi ng t hi s, such as RFC ( r emot e f unct i on cal l s) .

Page 28: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 28/83

 84 What has t o be done t o t he packed f i el ds bef oresubmi t t i ng to a BDC sessi on?Decl ar e t hese f i el ds i n t he i nt er nal t abl e as char act er sand t he l engt h of t he f i el d shoul d be same as t he f i el d

l engt h of t he f i el d' s dat a el ement . Thi s i nt er nal t abl ei s used t o hol d t he dat a f et ched f r om t he sequent i al f i l eusi ng WS- upl oad f unct i on modul e

What i s LSMW The LSMW i s a cr oss- appl i cat i on component ( CA) of t he SAPR/ 3 Syst em. The t ool has i nt er f aces wi t h t he Dat a Tr ansf er Center andwi t h bat ch i nput and di r ect i nput pr ocessi ng as wel l asst andar d i nt er f aces BAPI and I Doc i n R/ 3. The LSMW compr i ses t he f ol l owi ng mai n f unct i ons:1. Read dat a ( l egacy data i n spr eadsheet t abl es and/ orsequent i al f i l es) .Funct i on Read dat a r epl aces and enhances f unct i onsSpr eadsheet i nt er f ace and Host i nt er f ace of LSMW ver si on1. 0. You can use any combi nat i on out of PC and ser verf i l es now.2. Conver t dat a ( f r om t he sour ce i nt o t he t ar get f or mat ) .3. I mport data ( t o t he database used by t he R/ 3appl i cat i on) .

 TCODE - LSMW 

Page 29: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 29/83

 SAP Scr i pt s

What i s sap scr i pt and l ayout set?

Ans - SAPscr i pt i s t he i nt egr ated t ext management syst emof t he SAP R/ 3 Syst em. SAPscr i pt i s t i ght l y i nt egr at edi nt o the SAP Syst em. I t i s used f or many di f f er ent wor d-pr ocessi ng t asks al l over t he SAP Syst em.

What i s l ayout set?

A l ayout set i n SAPscr i pt i s used f or page l ayout . Thel ayout set cont ai ns var i ous el ement s, whi ch ar e used f orl ayout cont r ol of t he i ndi vi dual pages and al so cont ai nl ayout i nf ormat i on f or t ext s whi ch ar e t o be out put ont he i ndi vi dual pages.

 The l ayot of a document i s def i ned i n a l ayot set .A l ayout set speci f i ed t he appear ance and st r uct ur e of adocument .

Layout set s cont ai n pr edef i ned t ext modul es wi t h spacer eserved f or var i abl e dat a. You can use t hese t extmodul es f or di f f er ent appl i cat i on.

Ever y SAPscr i pt document uses a l ayout set .

 To make changes t o your documents, such as movi ng a pi eceof t ext , or changi ng f ont s, par agr aph f or mat s, and t abs,you onl y need t o change t he l ayout set .

 Ther e ar e t wo ways of f or mat t i ng t ext s usi ng l ayout set s: The t ext i s enter ed and out put i n st andar d t extmai nt enance. You can assi gn any l ayout set . Text can al sobe ent er ed vi a t he l ayout set a l et t er header , f orexampl e.

 The t ext i s f or mat t ed vi a an ABAP/ 4 program usi ng a

l ayout set . The pr ogr am can ei t her dynami cal l y out puti ndi vi dual pr edef i ned t ext modul es, t ext el ement s ort r ansf er ent i r e t ext s, whi ch ar e t o be out put i n t hel ayout set .

Page 30: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 30/83

  You can use St yl es t o def i ne t he f or mat t i ng of t he t exti n your document s. A st yl e deter mi nes t ext f ormat t i ng byset t i ng t he paragr aph and character f ormats used i n adocument . You can, f or exampl e, use a st yl e t o hi ghl i ght

char act er st r i ngs or whol e par agr aphs. You can assi gn ast yl e t o any t ext . Typi cal l y, however , you’ l l use st yl espr i mar i l y i n t he mai n wi ndows of l ayout sets, wher e userst ype or ent er t ext di r ect l y i n document s.

Header dat a i s f ound i n bot h st yl e and l ayout setmai ntenance.

I n st yl e mai nt enance, i t i s used pr i mar i l y t o pr esenti mpor t ant i nf or mat i on - desi gned t o make i t easi er f ort he end user t o sel ect a st yl e. The header dat a i n l ayoutset mai nt enance, on t he ot her hand, i s used f ori nf or mat i on and cont r ol pur poses.

Wi ndows ar e def i ned i n l ayout set mai nt enance. Theyr epr esent areas whi ch are posi t i oned on pages as pagewi ndows and i n whi ch t ext i s l at er out put . At l east onewi ndow must be def i ned f or each l ayout set . I f not , at ext cannot be f or mat t ed by SAP scr i pt .

 The f ol l owi ng wi ndow t ypes can be used:

MAI N – Mai n wi ndow i n whi ch cont i nuous t ext i s out put . Thi s i s t he wi ndow used by di al og user s of a pr i ntpr ogr am and l ayout set . For exampl e the body t ext of al et t er woul d be ent er ed i n MAI N.

VAR – Wi ndow wi t h var i abl e cont ent s. The t ext can var y oneach page i n whi ch t he wi ndow i s posi t i oned. Var i abl ewi ndows are f ormat t ed f or each page.

CONST – Wi ndow wi t h const ant content s whi ch i s onl yf ormat t ed once.

A l ayout set has t he f ol l owi ng el ement s:

Header data - Data rel ated t o devel opment ( cr eat ed by,devel opment cl ass, et c. ) and l ayout set i nf or mat i on( whi ch el ement s ar e used) are both st ored i n t he headerdat a. A st art page must be ent er ed her e.

Page 31: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 31/83

Par agr aph f ormats - Par agr aph f ormats are r equi r ed i nl ayout set s - as i n st yl es - i n or der t o f or mat t ext s.However , t hey ar e al so used f or word pr ocessi ng i n l ayoutset s, f or exampl e, t o f or mat t ext el ement s.

Character f ormats - You can al so use character f ormats t of or mat t exts or par agr aphs. Unl i ke par agr aph f or mat s,however , t hey ar e used t o f ormat t ext wi t hi n a paragr aph.

Wi ndows - Wi ndows ar e names and wi ndow t ypes, whi ch ar enot physi cal l y posi t i oned unt i l t hey ar e al l ocat ed t opages and uni t s of measur ement are speci f i ed.

Pages - Pages are def i ned t o pr ovi de t he syst em wi t h ast ar t and end poi nt i n t ext f or mat t i ng.

Page wi ndows - Page wi ndows ar e t he combi nat i on ofwi ndows and pages, wher e t he di mensi ons of a wi ndow andi t s posi t i on on a page ar e speci f i ed.

 The pur pose of SAP scr i pt cont r ol commands i s t o al l owcont r ol of t he out put f ormat t i ng. These commands are noti nt er pr et ed by the SAPscr i pt edi t or , but ar e passedt hr ough t o t he SAPscr i pt Composer f or pr ocessi ng. Thecomposer i s t he pr ogr am t hat conver t s t ext f r om t he f or mdi spl ayed i n t he edi t or t o t he f or m used f or pr i nt i ng.

What i s SAPscr i pt and expl ai n i t s pur pose?

SAP Scr i pt i s t he SAP syst em’ s own t ext - pr oessi ng syst em. You’ l l f i nd t hat i t l ooks and f eel s a l ot l i ke ot herl eadi ng t ext - pr ocessi ng syst em t hat you may use on yourper sonal comput er .

Every company needs t o out put document s wi t h a uni f orml ydef i ned l ayout ( eg. I nvoi ces, del i ver y not es, et c. . ) al lt he t i me.

 The basi c l ayout of t he document i s pre- def i ned , but i nmany cases, ot her dat a has t o be merged wi t h i t , such asaddr ess data or pur chase order i t ems. Thi s dat a mi ght beent er ed manual l y by a empl oyee, or r et r i eved f r om adat abase t abl e.

Large quant i t i es of t hese document s have t o be pr oduced.Fr om pr i nt i ng i s usual l y a mat t t er of l ar ge pr i nt r uns of

Page 32: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 32/83

document s such as paysl i ps, checks, or der conf i r mat i on,r emi nder s et c.

SAPscr i pt has been devel oped t o meet t he abover equi r ement s. I T i s an i nt egr at ed t ool f or t ext ent r y and

f or m pr i nt i ng i n R/ 3 appl i cat i ons.

 These document s ar e normal l y provi ded by SAP but everyorgani zat i on have t hei r uni que ways of t hese document s sot o cust omi ze t hese and f or cr eat i ng newer ones i fr equi r ed; SAP scri pt i s used.

What are components of SAPscr i pt ?

Layout set , SAPscr i pt Text , ABAP Pr i nt pr ogr am , symbol s,f unct i on modul es l i ke open_f orm, cl ose_Fr om, Read_t exte t c , .

What are t he ABAP/ 4 Commands t hat l i nk t o a l ayout set ?Cal l f unct i on OPEN- f or m.Cal l f unct i on WRI TE- f r om.Cal l f unct i on CLOSE- f r om 

I mpor t i ng Gr aphi cs ( Logos) i nt o SAPScr i pt The program RSTXLDMC can be used t o upl oad graphi cs ( f i l eext ensi on . t i f on PC f i l es) i nt o i ndi vi dual st andar d

t ext .

Ot her usef ul pr ogr ams f or SAPScr i ptRSTXFCON - Conver t s page f or matRSTXSCRP - Upl oad/ Downl oad l ayout set sRSTXDBUG - SAPScr i pt debugger

Debug SAPScr i pt You can debug a SAPScr i pt : Use Tool s - Wor d Pr ocessi ng -Layout Set .

Ent er name of l ayout set and t hen Ut i l i t i es - Act i vat eDebugger .

I t i s of no consequence whi ch l ayout set you ent er whensel ect i ng t he SAPscr i pt debugger . ( Menu pat h: Tool s- Word-pr ocessi ng - For ms, Ut i l i t i es - Act i vat e Debugger ) The

Page 33: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 33/83

next l ayout set cal l ed wi l l i nvoke t he debugger . Thi s i squi t e handy when ver i f yi ng whi ch l ayout set i s bei ngcal l ed ( Ver i f yi ng cust omi zi ng set t i ngs) .

Anot her way t o set t he SAPScr i pt debugger i s t o runprogram RSTXDBUG.

When a For m i s copi ed f r om one cl i ent t o anot her . And I fU t r y t o di spl ay or change t he f or m i n t he copi ed cl i ent. The possi bl e er r or message cud be :1. For m not f ound Tr y copi ng agai n speci f i ng t he l anguage .

2. I F I T di spal ys an er r or message sayi ng That t he t extf i l e i s i ncons i s tent . Then go t o SE38 and Run “RSTXCHKO” .I t wi l l ask f or t he f or m name , t hen check al l t hecheckboxes and t hen r un t he progr am.Not e : al l Scr i pt r el at ed pr obl ems can be sol ved usi ngPr ogr am ‘ RSTX*’ .

How t o t ake a back up of scr i pt l ayout i nt o U’ r har d di skand l oad i t l at erUse Pr ogr am RSTXSCRP.Use EXPORT mode, when downl oadi ng and I MPORT when

upl oadi ng a scr i pt . Don’ t f or get t o gi ve t he f or m name i nt he obj ect f i el d. Thi s wi l l creat e a scri pt wi t h t he samename as t hat of t he or i gi nal scri pt . I f a scri pt wi t ht he same name exi st s i n t he same cl i ent , t hen i t wi l lgi ve an er r or ‘ Obj ect cannot be over wr i t t en ’ .

I want t o copy tabl e acr oss cl i ent sUse Pr ogram RSCLTCOP

 To t r ansf er scr i pt f i l es acr oss syst ems ( Not Cl i ents) -RSTXSCRP

 To compare t he cont ents of a t abl e acr oss cl i ents:RSTBSERV

 To change t he devel opment cl ass of any obj ect - RSWBO052

What t ype of var i abl es nor mal l y used i n sap scr i pt t oout put data?

Page 34: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 34/83

&Tabl es name- f i el ds&.

How do you number pages i n sap scr i pt l ayout out put s?& page &&next Page &

What t akes most t i me i n SAP scr i pt progr ammi ng?Def i ni ng l ayout set up / set s.

How do you use t ab set s i n l ayout set s?Def i ne par agr aph wi t h def i ned t abs.

How do you backup sap scr i pt l ayout set s? Can youdownl oad and upl oad? How?SAP scr i pt backup : - I n t r ansact i on SE71 got o Ut i l i t i es -> Copy f r om cl i ent - > Gi ve sour ce f or m name, sour cecl i ent ( 000 def aul t ) , Tar get f or m name.Downl oad : - SE71, t ype f or m name - > Di spl ay - > Ut i l i t i es- > f or m i nf o - > Li st - > Save t o PC f i l e.Upl oad : - Cr eate f orm wi t h page, wi ndow, pagewi ndow wi t ht he hel p of downl oaded PC f i l e. Text el ement s f or Pagewi ndows t o be copi ed f r om PC f i l e.

What i s Compare Tool i n SAP Scr i pt ?SAP Scr i pt of f er s t ool s f or compar i ng obj ect s acr osscl i ent s. We can compar e or copy t he f ol l owi ng ki nds ofobj ect s.

St yl esLayout setsDocument sWi t h t he Compare tool we can do t he f ol l owi ng :Check whet her an obj ect exi st s i n bot h cl i ent sDi spl ay t he di f f er ences bet ween t he ver si ons of an obj ect

Layout Set s are used t o cont r ol page l ayout and t extf ormat t i ng i n document s .

SAP St andar d st yl es and l ayout sets ar e al ways hel d i n

Cl i ent 000.

I n what f or mat does SAP Scr i pt st or e t ext ?SAPscr i pt t exts are st ored i n I nt er change Text For mat( I TF) . SAPscr i pt of f er s conver si on pr ogr ams f or t he t extf i l e f or mat s Ri ch Text For mat ( RTF) and ASCI I as ani nt er f ace t o ot her wor d pr ocessors .

Page 35: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 35/83

 The var i ous wi ndow t ypes i n SAP Scr i pt ar eMai n, Var i abl e and Const ant .

 The New- Page command i s used t o f or ce a Page break i n t he

t ext at any poi nt .

Prot ect . . . Endpr otect command pai r s can be nest ed ( True/ Fal se) .Fal se.

Del i mi t er & must be used i mmedi at el y bef ore and af t er t hesymbol .

What does t he composer do?

 The f i nal appearance of your document depends oni nt er act i on bet ween t he pr i nt pr ogr am and t he l ayout set .

 The SAPscr i pt pr i nt program i ni t i al i zes t he pr i nt i ngpr ocess. Ever y command ent ered usi ng t he SAPscr i ptpr ogr ammi ng i nt er f aces i s t r ansf er r ed t o t he composer .

 The composer r ecei ved l ayout i nf or mat i on f r om t he l ayoutset speci f i ed by t he pr i nt pr ogr am. The document s ar ef or mat t ed accor di ng t o t hi s l ayout i nf or mat i on.

I f t he document s cont ai n var i abl es, t he composer r epl acest hese var i abl es wi t h data f r om t he R/ 3 syst em, such ast he cur r ent dat e, or wi t h t he userdat a sel ect ed by t hepr i nt pr ogr am.

 The pr i nt program cont r ol s t he compl et i on of t he l ayoutset . Once thi s i s done, t he composer pl aces t he compl et eddocument i n the spool .

Where do we def i ne Tab space f or dat a i n SAPScr i pt ?

When def i ni ng t he paragr aph f or t he t ext el ement we candef i ne t he TABS then. Ther e i s par amet er cal l ed TABS tobe def i ned i n par agr aph def i ni t i on.

Page 36: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 36/83

what i s di f f er ence bet ween Wi ndow & a Page Wi ndow?

Wi ndow: An ar ea t hat i s pr edef i ned i n t he l ayout set .Wi ndows ar e t ext modul es, whi ch ar e posi t i oned on adocument page.

We def i ne t he wi ndow t ype, Def aul t Par agr aph, speci f y t het ext el ement s or a SAPscr i pt t ext t o be i ncl uded et c i nt he Wi ndow Component .

PageWi ndow: we def i ne t he parameters of t he ear l i erdef i ned Wi ndow, appear ance on t he document l i ke l ef t orr i ght mar gi ns, Wi dt h & Hei ght .

What ar e symbol es & st ate t hei r di f f er ent t ypes wi t h E. g.

A Symbol i s a const ant , whi ch can be i nser t ed i n adocument . I t saves t he user unnecessary wor k whenr epl aci ng sect i ons of t ext , phr ases, et c. Each symbol hasa name whi ch i s encl oses by &.

Eg. &var i abl e name &Syst em symbol s eg &Dat e&, &t i me& et c.

St andard symbol s : St andard symbol s are user - def i ned. Theyare mai nt ai ned cent r al l y i n t abl e TTDTG. Eg. &SGDH& f ort he openi ng sal ut at i on : “dear si r / madam”.

&MFG& f or t he cl osi ng sal ut at i on : ”your s Fai t hf ul l y”.

Pr ogr am Symbol s : Pr ogr am symbol s di spl ay dat a f r om t heABAP/ 4 pr ogr am whi ch has cal l ed t he word pr ocessi ngf unct i on Eg. I t ab- conni d.

 Text symbol s: You can def i ne a t ext symbol f or any t extmodul e. Thi s symbol i s val i d onl y i n t he t ext modul e f orwhi ch you have def i ned i t . Eg. Def i ne &Symbol & = ‘ val ue’ .

How do we def i ne Text symbol s?

Usi ng t he cont r ol command DEFI NE &x1& = ‘ 56’ .

Stat e f ew cont r ol commands?.Pr ot ect . . endpr ot ect , def i ne, new- page, i ncl ude. . i f …endi f .

Page 37: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 37/83

 

what i s t he pur pose of “Prot ect and EndPr ot ect ”?.

 You can speci f y ei t her i n t he st yl e or i n t he l ayout set

t hat a par t i cul ar par agr aph shoul d not be sl i t i n t wo bya page beak. I f t he page pr ot ect at t r i but e i s set t hent he compl et e paragr aph i s al ways out put on a si ngl e page. Thi s proper t y appl i es onl y t o t hat par t i cul ar paragraph.SAPScr i pt provi des t he PROTECT… ENDPROTECT command pai rt o al l ow you t o def i ne t he areas t o be pr ot ect ed agai nsta page beak on an i ndi vi dual basi s. Thus t hePROTECT/ ENDPROTECT commands may be r egar ded as a ki nd ofcondi t i onal NEW- PAGE command, t he condi t i on bei ng whet heror not t he l i nes encl osed between t he t wo commands f i t i nt he space r emai ni ng i n t he curr ent mai n wi ndow.

How do we set t he dat e, t i me f ormat ?

SET TI ME MASK : CONROLS THE TI ME FI ELD FORMAT.SET DATE MASK : CONTRLS THE DATE FI ELD FORMAT.

EG. Set Ti me Mask = “ HH: MM: SS”.

what i s t he r ol e of an ABAP pr ogr am i n SAPScr i pt ?

Ret r i eves R/ 3 appl i cat i on dat a f r om t he dat abase.

Def i nes t he l ayout set pr ocessi ng l ogi c ( The or der andr epet i t i on of t ext el ement s) .

Chooses a l ayout set f or pr i nt i ng.

Sel ect s t he out put devi ce, such as pr i nt er , moni t or , orf ax.

Set s pr i nt at t r i but es such as i mmedi at e out put , number ofcopi es , and pages t o be pr i nt ed.

How t o r euse some component s of t he scr i pt l ayout t oot her progr am?

I s thi s scr i pt l ayout i s st andar d f or al l t he pr i nt er ? I fnot t hen y we ar e goi ng f or scr i pt l ayout ?

Page 38: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 38/83

Gi ve me coupl e of met hods t hat I wi l l t ake st andardscr i pt l ayout pr i nt out f or di f f er ent pr i nt er .

How u wi l l anal ysi s scr i pt pr ogr am? ( whi ch goes t o mai nand how many wi ndows et c…. )

Can V i nser t ed l ogo on your progr am? Gi ve me t he progr amname whi ch upl oads my l ogo and syntax f or l ogo i nser t i ngi n sap scr i pt . Yes u can i nser t a l ogo on your scr i pt l ayout .Use t hi s Report “RSTXLDMC” whi ch wi l l upl oads t he l ogo.Use t he f ol l owi ng st atement whi ch i ncl udes t he l ogo onyour scri pt pr og.

/ : I NCLUDE ' ZHEX- MACRO- XXX' OBJ ECT TEXT I D ST LANGUAGE' E' .

XXX – obj ect name, u wi l l gi ves @ r unt i me i n r st xl dmcprogr am.

Gi ve me synt ax f or box command.BOX XPOS 2 MM WI DTH 0 CM HEI GHT ' 9. 5' CM FRAME 10 TW Scr i pt Commands.

Def i ni ng a var i abl e

DEFI NE &CUST& = ' 00000021' .

Def i ne and i nser t a st andar d t ext :

St andar d t ext s i s pr e- def i ned t ext s t hat can be used i nmore than one f orm. St andard t ext s ar e can be creat ed,changed and di spl ayed usi ng t r ansact i on SO10.

 The t ext I D i s used t o cal l si f y t ext s.

 To i ncl ude a st andar d t ext i n a f or m, use t he I NCLUDE

command:

/ : I NCLUDE Z_BC460_EX4_HF OBJ ECT TEXT I D SDVD

When f or mat t i ng t he st andar d t ext t he PARAGRAPH par amet eri s used. To cent er t he t ext use:

/ : I NCLUDE Z_BC460_EX4_HF OBJ ECT TEXT I D SDVD LANGUAGE EN

Page 39: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 39/83

PARAGRAPH C.

For mat t i ng addr esses

 The ADDRESS- ENDADDRESS command f or mat s addr esses

accor di ng t o t he post al nor ms of t he r eci pi ent ' s count r y,as def i ned i n t he

count r y paramet er .

ADDRESS DELI VERY PARAGRAPH ADNAME &KNA1- NAME&STREET &KNA1- STRAS&POSTCODE &KNA1- PSTLZ&CI TY &KNA1- ORT01&'COUNTRY &KNA1- LAND1&FROMCOUNTRY ' DE'ENDADDRESS

Avoi di ng page br eaks i n a paragr aph

/ : PROTECT::/ : ENDPROTECT

 The t ext l i nes t o be pr ot ect ed ar e encl osed between t het wo commands

Condi t i onal t ext out put I F - ENDI F

 You can use I F/ ENDI F l i ke i n a normal ABAP program / : I F condi t i on::/ : ENDI F

and

/ : I F condi t i on:/ : ELSE:/ : ENDI F

Exampl e:

Page 40: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 40/83

 / : I F &SPFLI - CI TYTO& = "BERLI N". . . . . put some t ext her e/ : ENDI F

Symbol s and Cont r ol commands

Symbol s ar e pl acehol der s f or val ues t hat ar e i nsert eddur i ng pr i nt f or mat t i ng.

Symbol s ar e i ndent i f i ed by name surr ounded by "&" and arenot case sensi t i ve

 Types of symbol s

Syst em symbol s

DATE Dat eDAY DayNAME_OF_DAY Name of dayMONTH Mont h YEAR Year TI ME Ti me

HOURS Hour sMI NUTES Mi nut esSECONDS SecondsPAGE Page number

NEXTPAGE Number of next pagr eDEVI CE Out put devi ceSPACE Bl ank spaceULI NE Under l i neVLI NE Ver t i cal l i neStandar d symbol s

St andard symbol s ar e user def i ned and are mai nt ai ned i nt abl e TTDG( t abl e i s not avai l abl e???) . You uset r ansact i on SM30 t o change or di spl ay st andard symbol s.

An exampl es of st andar d symbol s i s &MFG& f or "Yoursf ai t hf ul l y"

St andar d t ext

St andar d t ext s i s pr e- def i ned t ext s t hat can be used i nmore than one f orm. St andard t ext s ar e can be creat ed,changed and di spl ayed usi ng t r ansact i on SO10.

Page 41: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 41/83

  The t ext I D i s used t o cl assi f y t ext s.

 To i ncl ude a st andar d t ext i n a f or m, use t he I NCLUDEcommand:

/ : I NCLUDE Z_BC460_EX4_HF OBJ ECT TEXT I D SDVD

When f or mat t i ng t he st andar d t ext t he PARAGRAPH par amet eri s used. To cent er t he t ext use:

/ : I NCLUDE <name> <Par amet er >

<par amet er> = Obj ect , I D, Language, Par agr aph

Exampl e:

/ : I NCLUDE Z_BC460_EX4_HF OBJ ECT TEXT I D SDVD LANGUAGE ENPARAGRAPH C.

Name: Z_BC460_EX4_HF

Obj ect : Text

 Text i d: SDVD ( Text i d f r om SO10)

Language: EN

Par agr aph: C ( Cent er ed)

 Ti p: You can use menu I nser t - >Text - >St andar d t o make i teasi er t o i nser t t he t ext

Progr am symbol s

Pr ogr am symbol s are f or cont ent s of dat abase f i el ds or

gl obal pr ogr am symbol s. When you pr i nt t he f orm, dataf r om t he dat abase t abl es ar e pr i nt ed i nst ead of t hesymbol s.

I n t he pr i nt pr ogr am:

 TABLES: kna1.

Page 42: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 42/83

I n t he f or m:

&KNA1- NAME1&

For mat t i ng

&SYMBOL& No f or mat t i ng&SYMBOL+4& Of f set - Out put begi ns her e. Of f set r ef ers t of ormat t ed val ue&SYMBOL( 5) & Lengt h - Output dat a i n t he speci f i ed l engt h&SYMBOL( I ) & Suppr ess i ni t i al val ue - I f t he f i el d hasbeen i ni t i al i zed, not hi ng i s out put&SYMBOL( Z) & Suppr ess l eadi ng zer os&SYMBOL( C) & Compress bl ank spaces – Consequt i ve spacesare compr essed i nt o a si ngl e space. Leadi ng spaces ar esuppr essed.

&SYMBOL( R) & Ri ght al i gn out put&SYMBOL( S) & Oper at or s ar e suppressed&SYMBOL( *) & Di ct i onary l engt h - The data l engt h i sdef i ned by the ABAP di ct i onary&SYMBOL( 8. 2)& Deci mal f or mat . Lengt h 8 deci mal s 2&' t ext 1' SYMBOL' t ext 2' & Text can be i nser t ed bef ore andaf t er t he symbol

Cont r ol commands

Cont r ol command are used t o modi f y t ext out put . Usef or mat key / : i n t he f ormat col umn.

/ : I NCLUDE/ : DEFI NE/ : ADDRESS. . . . ENDADDRESS/ : PROTECT. . . . . ENDPROTECT

/ : NEW- PAGE/ : I F. . . . ENDI F

/ : CASE. . . ENDCASE

Exampl es of cont r ol commandsI NCLUDE

I NCLUDE name <par amet er >

Par amet er s:

Page 43: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 43/83

 OBJ ECT E. g. TEXT, DOKU ( Document ) , DSYS (Hyper t ext ) .I D Text I D - Text I D i s a way to gr oup t exts - Set r ansact i on SO10LANGUAGE I f t he paramet er i s not speci f i ed, t he l ogon

l anguage wi l l be usedPARAGRAPH The t ext t o be i ncl uded i s f ormat t ed usi ng t hest yl e al l ocat ed. The PARAGRAPH par amet er can be used t or edef i ne t he st andar d par agr aph f or t hi s st yl e f or t hecur r ent cal l . Al l *- par agr aphs i n t he i ncl uded t ext wi l lt hen be f or mat t ed usi ng t he par agr aph speci f i ed her e.

Obj ectI DLanguagePar agr aphSt andar d t exts ar e mai nt ai ned i n t r ansact i on SO10.

Exampl e 1:

 You have cr eat ed a st andar d t ext i n SO10 Named MYTEXT andwi t h Text I d ST

/ : I NCLUDE MYTEXT OBJ ECT t ext I D st

Exampl e 2:

 You can al so use a dynami c name so t hat you can r et r i eve

a ext dependi ng of t he name var i abl e:

/ : I NCLUDE &SCUSTOM- NAME& t ext I D st .

Dependi ng on t he name i n t he var i abl e &SCUSTOM- NAME&di f f er ent t ext s wi l l be shown. Not e t hat a text wi t h t hename i n t he var i abl e &SCUSTOM- NAME& name must be cr eat edi n SO10.

DEFI NE

/ : DEFI NE &SYMBOL& = ' St r i ng1 St r i ng2'

/ : DEFI NE &CUST& = ' 00000021' .

ADDRESS- ENDDRESS

 The ADDRESS- ENDADDRESS command f or mat s addr essesaccor di ng t o t he post al nor ms of t he r eci pi ent ' s count r y,

Page 44: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 44/83

as def i ned i n t hecount r y paramet er .

/ : ADDRESS DELI VERY PARAGRAPH AD/ : NAME &KNA1- NAME&

/ : STREET &KNA1- STRAS&/ : POSTCODE &KNA1- PSTLZ&/ : CI TY &KNA1- ORT01&/ : COUNTRY &KNA1- LAND1&/ : FROMCOUNTRY ' DE'/ : ENDADDRESS

 Ti me Dat e and deci mal f or mat

Exampl es:

/ : SET TI ME MASK = ' HH: MM'/ : SET DATE MASK = ' DD. MMMM. YYYY'/ : SET COUNTRY ' USA'

Fr ames, l i nes and shadi ng

BOX

Dr aws a box

Synt ax:

/ : BOX <xpos> <ypos> <wi dt h> <hei ght > <f r ame> <i nt ensi t y>

 The i nt ensi t y i s t he gr ey scal e of t he box as %. Thef r ame par amet er s i s t he thi ckness of t he f r ame. Def aul ti s 0.Each of t he paramet er s ypos, xpos, wi dt h, hei ght andf r ame must be f ol l owed of t he measur ement uni t :

 TW ( t wi p)PT ( poi nt )

I N ( i nch)MM ( mi l l i met er )CM ( cent i met er )LN ( l i ne)CH ( char act er ) .

Exampl es:

Page 45: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 45/83

/ : BOX XPOS ' 11. 21' MM YPOS ' 5. 31' MM HEI GHT ' 10' MMWI DTH ' 20' MM I NTENSI TY 10 FRAME 0 TW / : BOX FRAME 10 TWDr aws a f r ame ar ound t he cur r ent wi ndow wi t h a f r ame

t hi ckness of 10 TW ( = 0. 5 PT) .

/ : BOX I NTENSI TY 10Fi l l s t he wi ndow backgr ound wi t h shadi ng havi ng a gr ayscal e of 10 %.

/ : BOX HEI GHT 0 TW FRAME 10 TWDr aws a hor i zont al l i ne across t he compl et e t op edge oft he wi ndow.

/ : BOX WI DTH 0 TW FRAME 10 TWDr aws a ver t i cal l i ne al ong t he compl et e hei ght of t hel ef t hand edge of t he wi ndow.

/ : BOX WI DTH ' 17. 5' CM HEI GHT 1 CM FRAME 10 TW I NTENSI TY15

/ : BOX WI DTH ' 17. 5' CM HEI GHT ' 13. 5' CM FRAME 10 TW/ : BOX XPOS ' 10. 0' CM WI DTH 0 TW HEI GHT ' 13. 5' CM FRAME10 TW/ : BOX XPOS ' 13. 5' CM WI DTH 0 TW HEI GHT ' 13. 5' CM FRAME10 TW 

Dr aws t wo rect angl es and t wo l i nes t o const r uct a t abl eof t hr ee col umns wi t h a hi ghl i ght ed headi ng sect i on.

POSI TI ON and SI ZE

 You can use t he POSI TI ON and SI ZE commands t o set def aul tpar met er s f or a box. Thi s can be use f ul l i f you havesever al boxes t hat shar e the same parameters.

Exampl e:

/ : POSI TI ON XORI GI N ' 11. 21' YORI GI N ' 5. 31' MM/ : SI ZE HEI GHT ' 2' MM WI DTH ' 76' MM/ : BOX FRAME 10 TW I NTENSI TY 10

I f you want t o set t he posi t i on r el at i vel y t o t he wi ndowuse POSI TI ON WI NDOW t o set t he posi t i on t o t he t op/ l ef t

Page 46: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 46/83

st ar t of t he wi ndow. Then use POSI TI ON t o set t he cur r entposi t i on r el at i vel y t o t he st ar t of t he Wi ndow. Not e t hatyou uses "+" or " - " i n t he ORI GI N posi t i on t o t he set t heposi t i on rel at i vel y.

/ : POSI TI ON WI NDOW/ : POSI TI ON XORI GI N ' +5' MM YORI GI N ' +10' MM t he posi t i on i s now 5 MM f r om t he l ef t and 10 MM f r om t het op of t he wi ndow.

NOTE: Af t er usi ng t he posi t i on command you can move t hecur r ent posi t i on r el i t i vel y t o t he l ast used posi t i on

/ : POSI TI ON XORI GI N ' +10' MM YORI GI N ' +20' MM Now t he posi t i on wi l l be X = 15 and Y = 30

Dr awi ng a l i ne You can draw a l i ne by set t i ng t he Hei ght or Wi dt h of abox t o 0 and add a f r ame. E. g. a hor i zont al l i ne:

/ : SI ZE HEI GHT ' 0' MM WI DTH ' 200' MM/ : BOX FRAME 10 TW XPOS ' 11. 21' MM YPOS ' 14. 81' MMI NTENSI TY 100

Wi ndow and Page

WI NDOW set s t he val ues f or t he wi dt h and hei ght t o t heval ues of t he cur r ent wi ndow ( def aul t set t i ng) .

PAGE Set s t he val ues f or t he wi dt h and hei ght t o t heval ues of t he cur r ent out put page.

Exampl es:

/ : SI ZE WI NDOWSet s WI DTH and HEI GHT t o t he cur r ent wi ndow di mensi ons.

/ : SI ZE WI DTH ' 3. 5' CM HEI GHT ' 7. 6' CMSet s WI DTH t o 3. 5 cm and HEI GHT t o 7. 6 cm.

/ : POSI TI ON WI NDOW/ : POSI TI ON XORI GI N - 20 TW YORI GI N - 20 TW

Page 47: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 47/83

/ : SI ZE WI DTH +40 TWHEI GHT +40 TW/ : BOX FRAME 10 TWA f r ame i s added t o t he cur r ent wi ndow. The edges of t hef r ame ext end beyond t he edges of t he wi ndow i t sel f , so ast o avoi d obscur i ng t he l eadi ng and t r ai l i ng t ext

char act er s.

61. Cal l i ng a f or m f r om SapScri pt ( *****)

/ : DEFI NE &CUST& = ' 00000021' ./ : PERFORM GET_NAME I N PROGRAM Z_BC460_EX4_HF/ : USI NG &CUST&/ : CHANGI NG &NAME&/ : ENDPERFORM.

Dear &NAME&

 The ABAP r out i ne coul d be def i ned as f ol l ows:

I MPORTANT: The st r uct ur e i t csy must be used f or t heparamet er s.

REPORT Z_HENRI KF_SCRI PT_FORM .t abl es scust om.f or m get _name t abl es i n_t ab st r uct ur e i t csyout _t ab st r uctur e i t csy.

r ead t abl e i n_t ab i ndex 1.

sel ect si ngl e * f r om scust omwher e i d = i n_t ab- val ue.

i f sy- subr c = 0.r ead t abl e out _t ab i ndex 1.move scust om- name t o out _t ab- val ue.

modi f y out _t ab i ndex sy- t abi x.el se.r ead t abl e out _t ab i ndex 1.move ' No name' t o out _t ab- val ue.modi f y out _t ab i ndex sy- t abi x.endi f .

** You coul d al so f i l l t he ouput par amet er t abl e t hi s way

Page 48: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 48/83

READ TABLE out _par WI TH KEY ' NAME1' .out _par- val ue = l _name1.

MODI FY out _par I NDEX sy- t abi x.

endf orm.

Not e t hat i f you use mor e t han one par amet er you must useUsi ng or Changi ng bef ore ever y parameter !

/ : PERFORM <f or m> I N PROGRAM <pr og>/ : USI NG &I NVAR1&/ : USI NG &I NVAR2&. . . . . ./ : CHANGI NG &OUTVAR1&/ : CHANGI NG &OUTVAR2&. . . . . ./ : ENDPERFORM 62. St r uct ur e of a pr i nt pr ogr am  The pr i nt program i s used t o pr i nt f or ms. The programr et r i eves t he necessary dat a f r om dat abase t abl es,def i nes t he or der of i n whi ch t ext el ement s are pr i nt ed,chooses a f or m f or pr i nt i ng and sel ect s an out put devi ceand pr i nt opt i ons.

Open f or m pr i nt i ng - Must be cal l ed bef or e wor ki ng wi t hany of t he ot her f or m f unct i on modul es.cal l f unct i on ' OPEN_FORM' . . . . .Must be ended wi t h f unct i on modul e CLOSE FORM *To begi n sever al i ndent i cal f or ms cont ai ni ng di f f er entdat a wi t hi n a si ngl e spool r equest , begi n each f or m usi ngSTART_FORM, and end i t usi ng END_FORMcal l f unct i on ' START_FORM' . . . . .

Wr i t e t ext el ement s t o a wi ndow of t he f ormcal l f unct i on ' WRI TE_FORM' . . . . .

Ends f or mcal l f uncti on ' END_FORM' . . . . .

Page 49: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 49/83

Cl oses f or m pr i nt i ngcal l f unct i on ' CLOSE_FORM' . . . .

Exampl es of f unct i on cal l s

OPEN FORM CALL FUNCTI ON ' OPEN_FORM'EXPORTI NG* APPLI CATI ON = ' TX'* ARCHI VE_I NDEX =* ARCHI VE_PARAMS =DEVI CE = ' PRI NTER'DI ALOG = ' X'* FORM = ' '* LANGUAGE = SY- LANGUOPTI ONS = OPTI ONS

* MAI L_SENDER =* MAI L_RECI PI ENT =* MAI L_APPL_OBJ ECT =* RAW_DATA_I NTERFACE = ' *'I MPORTI NG* LANGUAGE =* NEW_ARCHI VE_PARAMS =* RESULT =EXCEPTI ONS

CANCELED = 1DEVI CE = 2FORM = 3OPTI ONS = 4

UNCLOSED = 5MAI L_OPTI ONS = 6ARCHI VE_ERROR = 7I NVALI D_FAX_NUMBER = 8MORE_PARAMS_NEEDED_I N_BATCH = 9OTHERS = 10

.START_FORM CALL FUNCTI ON ' START_FORM'EXPORTI NG* ARCHI VE_I NDEX =FORM = ' MY_FORM'

Page 50: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 50/83

* LANGUAGE = ' '* STARTPAGE = ' '* PROGRAM = ' 'MAI L_APPL_OBJ ECT =I MPORTI NG

* LANGUAGE =EXCEPTI ONSFORM = 1FORMAT = 2UNENDED = 3UNOPENED = 4UNUSED = 5OTHERS = 6

WRI TE_FORM See ' WRI TE_FORM'

END_FORM CALL FUNCTI ON ' END_FORM'

I MPORTI NG* RESULT =EXCEPTI ONS* UNOPENED = 1BAD_PAGEFORMAT_FOR_PRI NT = 2

OTHERS = 3

CLOSE_FORM St r uct ur e f or Pr i nt opt i ons ( r et ur n val ues) - Pagessel ect ed f or pr i nt i ng, Number of copi es et c.DATA BEGI N OF RESULT.I NCLUDE STRUCTURE I TCPP.DATA END OF RESULT.

CALL FUNCTI ON ' CLOSE_FORM'

I MPORTI NGRESULT = RESULT

* RDI _RESULT = TABLES* OTFDATA =EXCEPTI ONS* UNOPENED = 1

Page 51: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 51/83

BAD_PAGEFORMAT_FOR_PRI NT = 2* SEND_ERROR = 3* OTHERS = 4.

63. CONTROL_FORM - Cal l i ng Commands Usi ng a pr ogram  The f unct i on modul e CONTROL_FORM can be used t o cr eat eSapScr i pt cont r ol st at ement s f r om wi t hi n an ABAP pr ogr am.

Exampl e:

cal l f unct i on ' CONTROL_FORM'EXPORTI NGCOMMAND = ' PROTECT' .

cal l f unct i on ' WRI TE_FORM' . . . . . . . . . . . . . . . . . . . . .

cal l f unct i on ' CONTROL_FORM'EXPORTI NGCOMMAND = ' ENDPROTECT' .

St yl es

St yl es are used t o pr edef i ne paragr aph and characterf or mat s f or f or ms. SAP pr ovi des sever al st andar d st yl ese. g. f or Addr ess i ncl udes, on- l i ne document at i on and so

on. You can def i ne your own st yl es.

 To f i nd st yl es, cr eat e st yl es and mai nt ai n st yl es, uset r ansact i on SE72.

 You assi gn st yl e t o a t ext by usi ng menu For mat - > St yl e

 You can make t emporar y st yl e changes usi ng t he cont r olcommand / : STYLE

Usi ng gr aphi cs i n SapScr i pt

Use t r ansact i on SE78 t o i mport gr aphi cs t o SAP.

I n t he f or m pai nt er , you can ei t her i ncl ude di r ect l y t ot he f orm usi ng menu Edi t - >Gr aphi c- >Cr eate or usi ng t heI NCLUDE st at ement i n a wi ndow.

Page 52: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 52/83

 To use an I NCLUDE st at ement , got o i nt o t he wi ndow scr i ptedi t or and use menu I ncl ude- >Gr aphi c. The i ncl ude canl ook l i ke t hi s f or a bi t map:

/ : BI TMAP MYLOGO OBJ ECT GRAPHI CS I D BMAP TYPE BMON

Modi f i cat i onsConsi der at i ons i n connect i on wi t h modi f i cat i ons

 The st andar d SAP pr i nt program shoul d onl y be changedwhen i t i s absol ut el y necessar y. I f addi t i onal dat a i sneeded, t hese can i n many cases be r et r i eved usi ng a aPERFORM st atement i n t he f orm i nst ead of changi ng t hepr i nt pr ogr am. .

 There can be t he f ol l owi ng r easons t o change t he pr i ntprogr am:

St r uct ur al changesNew t ext el ements ar e neededPr i nt pr ogr am t o be used t o pr i nt addi t i onal f or ms

Det ermi ne/ change whi ch f orms and pr i nt pr ogr ams t hat areused f or pr i nt i ng

 The f or ms and pr i nt programs f or a gi ven out put t ype andappl i cat i on can be f ound i n t abl e TNAPR Processi ngpr ogr ams f or out put

Use vi ew V_TNAPR i n ( Transact i on SE30) t o change ent r i es.

I mpor t / Expor t SapScri pt f or m f r om PC f i l eUse ABAP pr ogr am: RSTXSCRP

SD - Fi ndi ng t he name of t he pr i nt pr ogr amFor SD document s you can use t abl e TNAPR t op f i nd t hename of t he a pr i nt pr ogr am 

Modul e Pool

 Tr ansact i ons:A t r ansact i on i s a pr ogr am t hat conduct s a di al og wi t ht he user . I n a t ypi cal di al og, t he syst em di spl ays ascr een on whi ch t he user can ent er or r equesti nf or mat i on. Based on t he t he user i nput or r equest , t he

Page 53: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 53/83

pr ogr am execut es t he appr opr i at e acti ons l i ke, i tbr anches t o t he next scr een, di spl ays an out put , orchanges t he dat abase.

Expl ai n what i s a t r ansact i on i n SAP ter mi nol ogy.

- I n SAP t er mi nol ogy, a t r ansact i on i s ser i es ofl ogi cal l y connect ed di al og st eps.

Expl ai n how SAP GUI handl es out put scr een f or t he user .- User t er mi nal i nput i s accept ed by SAP GUI and sent t ot he SAP di spat cher . The di spat cher co- or di nat es t hei nf or mat i on exchange bet ween the SAP GUI s and t he wor kpr ocesses. The di spat cher f i r st pl aces t he pr ocessi ngr equest i n r equest queues, whi ch i t t hen pr ocesses. Thedi spat cher di spat ches t he r equest s t o t he avai l abl e wor kpr ocess. The act ual pr ocessi ng t akes pl ace i n t he wor kpr ocess. When pr ocessi ng i s compl et e, t he r esul t of awor k pr ocess i s r et ur ned vi a t he di spat cher t o t he SAPGUI . The SAP GUI i nt er pr et s t he recei ved data andgener at es t he out put scr een f or t he user .

What i s LUW or Database LUW or Database Transact i on ?- A “LUW” ( l ogi cal uni t of wor k ) i s t he span of t i medur i ng whi ch any dat abase updat es must be per f ormed .Ei t her t hey ar e al l per f ormed ( commi t t ed ) , or t hey ar eal l t hr own away ( r ol l ed back ) .

LUW ( or “dat abase LUW” or “dat abase t r ansact i on” )

 Thi s i s t he set of updat es t er mi nat ed by a dat abasecommi t . A LUW l ast s, at most , f r om one scr een change t ot he next ( because t he SAP syst em t r i gger s dat abasecommi t s aut omat i cal l y at ever y scr een change ) .

LUWs hel p t o guar ant ee dat abase i nt egr i t y. When an LUWhas been successf ul l y concl uded, t he database i s onceagai n i n a cor r ect st at e. I f , however , an er r or occur swi t hi n an LUW, al l dat abase changes made si nce t hebegi nni ng of t he LUW ar e cancel ed and the dat abase i st hen i n t he same st at e as bef or e t he LUW st ar t ed.

An LUW begi ns

- Each t i me you st ar t a t r ansact i on- When t he dat abase changes of t he previ ous LUW have beenconf i r med ( dat abase commi t ) or- when t he dat abase changes of t he previ ous LUW have beencancel l ed ( dat abase rol l back)

Page 54: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 54/83

 An LUW ends

- When t he dat abase changes have been conf i r med ( dat abasecommi t ) or

- When t he dat abase changes have been cancel ed ( dat abaser ol l back)

What i s SAP LUW or Updat e Tr ansact i on ?

Updat e t r ansact i on ( or “SAP LUW”)

 Thi s i s a set of updat es t er mi nat ed by an ABAP/ 4 commi t .A SAP LUW may l ast much l onger t han a dat abase LUW, si ncemost update pr ocessi ng ext ends over mul t i pl e t r ansact i onscr eens. The pr ogr ammer t ermi nat es an updat e t r ansact i onby i ssui ng a COMMI T WORK st at ement .

Does t he ext ernal pr ogr am r un i n t he same SAP LUW as t hecal l er , or i n a separ at e one?- Transact i ons r un wi t h a separate SAP LUW- Repor t s r un wi t h a separat e SAP LUW- Di al og modul es r un i n t he same SAP LUW as t he cal l er- Funct i on modul es r un i n the same SAP LUW as t he cal l er The onl y except i ons t o t he above r ul es ar e f unct i onmodul es cal l ed wi t h I N UPDATE TASK ( V2 f unct i on onl y) or

I N BACKGROUND TASK ( ALE appl i cat i ons) . These al ways r uni n t hei r own ( separ at e) updat e t r ansact i ons.

What ar e t he r equi r ement s a di al og pr ogr am must f ul f i l l ?- A di al og pr ogr am must f ul f i l l t he f ol l owi ngr equi r ement s. a user f r i endl y user i nt er f ace. f ormat and consi st ency checks f or t he dat a ent er ed byt he user. easy cor r ect i on of i nput er r or s

. access t o dat a by st or i ng i t i n t he dat abase.

What are t he basi c component s of di al og pr ogr am ?- Scr eens ( Dynpr os)Each di al og i n an SAP syst em i s cont r ol l ed by dynpr os. ADynpr o consi st s of a screen and i t s f l ow l ogi c andcont r ol s exact l y one di al og st ep.- ABAP/ 4 modul e pool

Page 55: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 55/83

Each dynpr o ref er s t o exact l y one ABAP/ 4 di al og pr ogr am.Such a di al og pr ogr am i s al so cal l ed a modul e pool , si ncei t consi st s of i nt er act i ve modul es.

What i s a dynpro ? What are i t s components ?

- A dynpr o ( DYnami c PROgr am) consi st s of a scr een and i t sf l ow l ogi c and cont r ol s exact l yone di al og st ep.- The di f f er ent component s of t he dynpr o ar e:Fl ow l ogi c: Cal l s of t he ABAP/ 4 modul es f or a scr eenScreen l ayout : Posi t i ons of t he t ext s, f i el ds,pushbut t ons, and so on f or a scr eenScr een at t r i but es: Number of t he scr een, number of t hesubsequent scr een, and ot hersFi el d at t r i but es: Def i ni t i on of t he at t r i but es of t hei ndi vi dual f i el ds on a screen

What i s scr een f l ow l ogi c? What ar e t he sel ect i ons i n i t ?Expl ai n PAI and PBO?

Ans - Scr een f l ow l ogi c cont ai ns t he pr ocedur al par t of ascr een. The scr een f l ow l ogi c i s l i ke an ABAP pr ogr am i nt hat i t ser ves as a cont ai ner f or pr ocessi ng bl ocks. There ar e f our event bl ocks, each of whi ch i s i nt r oducedwi t h t he scr een keywor d PROCESS:

PROCESS BEFORE OUTPUT.

. . .PROCESS AFTER I NPUT.. . .PROCESS ON HELP- REQUEST.. . .PROCESS ON VALUE- REQUEST.

Sel ect i ons are per f or med i n PAI .

PROCESS BEFORE OUTPUT ( PBO) i s aut omat i cal l y t r i ggeredaf t er t he PAI pr ocessi ng of t he pr evi ous scr een and

bef or e t he cur r ent scr een i s di spl ayed. You can pr ogr amt he PBO pr ocessi ng of t he scr een i n t hi s bl ock. At t heend of t he PBO pr ocessi ng, t he scr een i s di spl ayed.

PROCESS AFTER I NPUT ( PAI ) i s t r i ggered when t he userchooses a f unct i on on t he scr een. You can pr ogr am t he PAIpr ocessi ng of t he scr een i n t hi s bl ock. At t he end of t hePAI .

Page 56: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 56/83

pr ocessi ng, t he syst em ei t her cal l s t he next screen orcar r i es on pr ocessi ng at t he poi nt f r om whi ch t he scr eenwas cal l ed.

PROCESS ON HELP- REQUEST ( POH) and PROCESS ON VALUE-

REQUEST (POV) are t r i gger ed when t he user r equest s f i el dhel p ( F1) or possi bl e val ues hel p ( F4) r espect i vel y. Youcan pr ogr am t he appr opr i at e codi ng i n t he cor r espondi ngevent bl ocks. At t he end of pr ocessi ng, t he syst emcar r i es on pr ocessi ng t he cur r ent scr een.

Can we use WRI TE st at ement i n scr een f i el ds ? I f not howi s dat a t r ansf er r ed f r om f i el d dat a t o scr een f i el ds- We cannot wr i t e f i el d dat a t o t he scr een usi ng t heWRI TE st atement . The syst em i nst ead t r ansf ers data bycompar i ng scr een f i el d names wi t h ABAP/ 4 var i abl e names.I f bot h names ar e t he same, i t t r ansf er s scr een f i el dval ues t o ABAP/ 4 pr ogr am f i el ds and vi ce- ver sa. Thi shappens i mmedi at el y bef ore and i mmedi at el y af t erdi spl ayi ng t he screen.

How does t he i nteract i on bet ween t he Dynpro and t heABAP/ 4 modul es t akes pl ace ?- A t r ansact i on i s a col l ect i on of scr eens and ABAP/ 4r out i nes, cont r ol l ed and execut ed by a Di al og pr ocessor. The Di al og processor pr ocesses scr een af t er scr een,t her eby t r i gger i ng the appr opr i at e ABAP/ 4 pr ocessi ng f oreach scr een. For each scr een, t he syst em execut es t he

f l ow l ogi c t hat cont ai ns t he cor r espondi ng ABAP/ 4pr ocessi ng. The cont r ol passes f r om screen f l ow l ogi c t oABAP/ 4 code and back.

How does t he Di al og handl e user r equest s ?- When an act i on i s per f or med, t he syst em t r i gger s t hePROCESS AFTER I NPUT event . The dat a passed i ncl udes f i el dscr een data ent er ed by t he user and a f unct i on code. Af unct i on code i s a t echni cal name that has been al l ocat edi n the Scr een Pai nt er or Menu Pai nt er t o a menu ent r y, apushbut t on, t he ENTER key or a f unct i on key of a scr een.

An i nt er nal wor k f i el d ( ok- code) i n t he PAI modul eeval uat es t he f unct i on code, and t he appr opr i at eacti on i s t aken.

How ar e the f unct i on codes handl ed i n f l ow l ogi c ?- When t he user sel ect s a f unct i on i n a t r ansact i on, t hesyst em copi es t he f unct i on code i nt o a speci al l ydesi gnat ed wor k f i el d cal l ed OK_CODE. Thi s f i el d i s

Page 57: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 57/83

gl obal i n the ABAP/ 4 modul e pool . The OK_CODE can t hen beeval uated i n t he corr espondi ng PAI modul e. The f unct i on code i s al ways passed i n exact l y t he sameway, r egar dl ess of whet her i t comes f r om a scr een' spushbut t on, a menu opt i on, f unct i on key or other GUI

el ement .

What cont r ol s t he screen f l ow ?- The SET SCREEN and LEAVE SCREEN st at ement s cont r olscr een f l ow.

What are “f i el d” and “chai n” st atement s ?- The FI ELD and CHAI N f l ow l ogi c st atement s l et youpr ogr am your own f i el d checks. FI ELD and CHAI N t el l t hesyst em whi ch f i el ds you ar e checki ng, and whet her t hesyst em shoul d per f or m checks i n t he f l ow l ogi c or cal l anABAP/ 4 modul e.

What i s an on “*- i nput f i el d” st at ement ?- ON *- I NPUT The ABAP/ 4 modul e i s cal l ed i f t he user has enter ed a "*"i n t he f i r st char acter of t he f i el d, and t he f i el d hast he at t r i but e *- ent r y i n t he Scr een Pai nt er . You can uset hi s opt i on i n except i onal cases wher e you want t o checkonl y f i el ds wi t h cer t ai n ki nds of i nput .

What are condi t i onal chai n st atement s ?

- ON CHAI N- I NPUT si mi l ar t o ON I NPUT. The ABAP/ 4 modul e i s cal l ed i f any one of t he f i el ds i nt he chai n cont ai ns a val ue ot her t han i t s i ni t i al val ue( bl anks or nul l s) .ON CHAI N- REQUEST Thi s condi t i on f unct i ons j ust l i ke ON REQUEST, but t heABAP/ 4 modul e i s cal l ed i f any one of t he f i el ds i n t hechai n changes val ue.

What i s “at exi t - command” ?- The f l ow l ogi c keywor d AT EXI T- COMMAND i s a speci al

addi t i on t o the MODULE st atement i n t he f l ow l ogi c. ATEXI T- COMMAND l et s you cal l a modul e bef ore t he syst emexecut es t he aut omat i c f i el d checks.

Whi ch f unct i on t ype has t o be used f or usi ng “at exi t -command” ?- To use AT EXI T- COMMAND, we must ass i gn a f unct i on type‘ E’ t o t he r el evant f unct i on i n t he Menu Pai nt er or

Page 58: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 58/83

Scr een Pai nt er .

What i s t he di f f er ence between SET SCREEN and CALL SCREEN?Wi t h SET SCREEN, t he cur r ent scr een si mpl y speci f i es t he

next scr een i n t he chai n. cont r ol br anches t o t hi s nextscr een as soon as t he cur r ent scr een has been pr ocessed.Ret ur n f r om next scr een t o cur r ent scr een i s notaut omat i c. I t does not i nt er r upt pr ocessi ng of t hecur r ent scr een. I f we want t o br anch t o t he next scr eenwi t hout f i ni shi ng t he cur r ent one, use LEAVE SCREEN.

Wi t h CALL SCREEN, t he cur r ent ( cal l i ng) chai n i ssuspended, and a next scr een ( or scr een chai n) i s cal l edi n. The cal l ed scr een can t hen r et ur n t o t he suspendedchai n wi t h t he st at ement LEAVE SCREEN TO SCREEN 0.Somet i mes we mi ght want t o l et an user cal l a popupscr een f r om t he mai n appl i cat i on screen t o l et t hem ent ersecondar y i nf or mat i on. Af t er t hey have compl et ed t hei rent r i es, t he users shoul d be abl e to cl ose t he popup andr et ur n di r ect l y to t he pl ace wher e t hey l ef t of f i n t hemai n scr een. Here comes CALL SCREEN i nto pi ct ure. Thi sst atement l et s us i nser t such a sequence i nt o t he cur r entone.

Can we speci f y t he next - scr een number wi t h a var i abl e. ( Yes / No ) . Yes.

 The f i el d SY- DYNNR r ef er s t o ________________.Number of t he curr ent scr een.

What i s a di al og modul e ?A di al og modul e i s a cal l abl e sequence of scr eens t hatdoes not bel ong t o a par t i cul ar t r ansact i on. Di al ogmodul es have t hei r own modul e pool s, and can be cal l ed byany t r ansact i on.

 The synt ax used t o cal l a scr een as a di al og box ( popup

) i s _________________.CALL SCREEN <scr een number >STARTI NG AT <st ar t col umn> <st ar t l i ne>ENDI NG AT <end col umn> <end l i ne> .

What i s a “cal l mode” ?I n t he ABAP/ 4 wor l d, each st ackabl e sequence of scr eensi s a "cal l mode" . Thi s i s i mpor t ant because of t he way

Page 59: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 59/83

you ret ur n f r om a gi ven cur r ent sequence. To t er mi nat e acal l mode and r et ur n t o a suspended chai n, set t he "nextscr een" t o 0 and l eave t o i t :LEAVE TO SCREEN 0 or ( SET SCREEN 0 and LEAVE SCREEN ) .When you r et urn to t he suspended chai n, execut i on r esumes

wi t h t he st at ement di r ect l y f ol l owi ng t he or i gi nal CALLSCREEN st at ement . The or i gi nal sequence of scr eens i n at r ansact i on i s i t sel f i s a cal l i ng mode. I f you LEAVE TOSCREEN 0 i n t hi s sequence ( t hat i s, wi t hout havi ngst acked any addi t i onal cal l modes ) , you r et ur n f r om t het r ansact i on al t oget her .

 The maxi mum number of cal l i ng modes st acked at one t i mei s ______ .Ni ne.

What i s LUW or Dat abase LUW or Dat abase Tr ansact i on ?A “LUW” ( l ogi cal uni t of wor k ) i s t he span of t i medur i ng whi ch any dat abase updat es must be per f ormed i n an“al l or not hi ng” manner . Ei t her t hey ar e al l per f or med (commi t t ed ) , or t hey ar e al l t hr own away ( r ol l ed back) . I n t he ABAP/ 4 wor l d, LUWs and t r ansact i ons can havesever al meani ngs:LUW ( or “dat abase LUW” or “dat abase t r ansact i on” ) Thi s i s t he set of updat es t er mi nat ed by a dat abasecommi t . A LUW l ast s, at most , f r om one screen change t ot he next ( because the SAP syst em t r i gger s dat abasecommi t s aut omat i cal l y at ever y scr een change ) .

What i s SAP LUW or Updat e Tr ansact i on ?Updat e t r ansact i on ( or “SAP LUW”) Thi s i s a set of updat es t er mi nat ed by an ABAP/ 4 commi t .A SAP LUW may l ast much l onger t han a dat abase LUW, si ncemost update pr ocessi ng ext ends over mul t i pl e t r ansact i onscr eens. The pr ogr ammer t ermi nat es an updat e t r ansact i onby i ssui ng a COMMI T WORK st at ement .

What happens i f onl y one of t he commands SET SCREEN andLEAVE SCREEN i s used wi t hout usi ng t he ot her ?

I f we use SET SCREEN wi t hout LEAVE SCREEN, t he programf i ni shes pr ocessi ng f or t he cur r ent screen bef or ebranchi ng t o <scr no>. I f we use LEAVE SCREEN wi t hout aSET SCREEN bef or e i t , t he cur r ent scr een pr ocess wi l l bet er mi nat ed and br anch di r ect l y t o t he scr een speci f i ed ast he def aul t next - screen i n t he screen at t r i but es.

Page 60: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 60/83

 What i s si gni f i cance of t he scr een number ‘ 0’ ?

I n "cal l i ng mode", t he speci al scr een number 0 ( LEAVE TOSCREEN 0) causes t he syst em t o j ump back t o t he pr evi ous

cal l l evel . That i s, i f you have cal l ed a scr een sequencewi t h CALL SCREEN l eavi ng t o scr een 0 t ermi nat es t hesequence and r et ur ns t o t he cal l i ng scr een. I f you havenot cal l ed a scr een sequence, LEAVE TO SCREEN 0t er mi nat es t he t r ansact i on.

What does t he command ‘ SUPPRESS DI ALOG’ do ?

Suppr essi ng of ent i r e screens i s possi bl e wi t h t hi scommand. Thi s command al l ows us t o per f orm scr eenpr ocessi ng “i n t he backgr ound”. Supr essi ng scr eens i susef ul when we ar e br anchi ng t o l i st - mode f r om at r ansact i on di al og st ep.

What i s t he si gni f i cance of t he memory t abl e ‘ SCREEN’ ?

At r unt i me, at t r i but es f or each screen f i el d ar e st or edi n t he memory t abl e cal l ed ‘ SCREEN’ . We need not decl aret hi s t abl e i n our pr ogr am. The syst em mai nt ai ns t he t abl ef or us i nt er nal l y and updat es i t wi t h ever y scr eenchange.

What are the f i el ds i n the memory t abl e ‘ SCREEN’ ?- Name Lengt h Descr i pt i on

Why gr oupi ng of f i el ds i s r equi r ed ? What i s t he maxi mumnumber of modi f i cat i on gr oups f or each f i el d ?

I f t he same at t r i but es need t o be changed f or sever alf i el ds at t he same t i me t hese f i el ds can be gr oupedt oget her . We can speci f y up t o f our modi f i cat i on gr oupsf or each f i el d.

What i s a scr een gr oup ? How i t i s usef ul ?

Scr een gr oup i s a f i el d i n t he Screen At t r i but es of ascr een. Her e we can def i ne a st r i ng of up t o f ourchar act er s whi ch i s avai l abl e at t he scr een r unt i me i nt he SY- DNGR f i el d. Rat her t han mai nt ai ni ng f i el dsel ect i on separatel y f or each scr een of a pr ogr am, we can

Page 61: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 61/83

combi ne l ogi cal l y associ ated scr eens t oget her i n a scr eengr oup.

What i s a Subscr een ? How can we use a Subscr een ?

A subscr een i s an i ndependent scr een t hat i s di spl ayed i nan area of anot her ( "mai n" ) scr een. To use a subscr een wemust cal l i t i n t he f l ow l ogi c ( bot h PBO and PAI ) oft he mai n scr een. The CALL SUBSCREEN st at ement t el l s t hesyst em t o execut e t he PBO and PAI event s f or t hesubscr een as par t of t he PBO or PAI event s of t he mai nscr een. The f l ow l ogi c of your mai n pr ogr am shoul d l ookas f ol l ows:

PROCESS BEFORE OUPTPUT.CALL SUBSCREEN <ar ea> I NCLUDI NG ' <pr ogr am>' ' <scr een>' .PROCESS AFTER I NPUT.CALL SUBSCREEN <ar ea>.

Ar ea i s t he name of t he subscr een area you def i ned i nyour mai n scr een. Thi s name can have up t o t enchar act er s. Pr ogr am i s t he name of t he pr ogr am t o whi cht he subscr een bel ongs and scr een i s t he subscr een' snumber .

What ar e the rest r i ct i ons on Subscr eens ?Subscr eens have sever al r est r i ct i ons. They cannot :

Set t hei r own GUI st at usHave a named OK codeCal l anot her scr eenCont ai n an AT EXI T- COMMAND modul eSuppor t posi t i oni ng of t he cur sor

How can we use / di spl ay t abl e dat a i n a scr een ?ABAP/ 4 of f er s t wo mechani sms f or di spl ayi ng and usi ngt abl e dat a i n a scr een. These mechani sms ar e TABLECONTROLS and STEP LOOPS.

What ar e t he di f f er ences between TABLE CONTROLS and STEPLOOPS ?

 TABLE CONTROLS ar e si mpl y enhanced STEP LOOPS t hatdi spl ay dat a wi t h t he l ook and f eel of a t abl e wi dget i na deskt op appl i cat i on. But f r om a pr ogr ammi ng st andpoi nt , TABLE CONTROLS and STEP LOOPS ar e al most exact l y t he

Page 62: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 62/83

same. One maj or di f f er ence between STEP LOOPS and TABLECONTROLS i s i n STEP LOOPS t hei r t abl e r ows can span mor et han one l i ne on t he screen. By cont r ast t he rows i n a TABLE CONTROLS ar e al ways si ngl e l i nes, but can be ver yl ong. ( Tabl e cont r ol r ows ar e scrol l abl e ) . The

st r uct ur e of t abl e cont r ol s i s di f f er ent f r om step l oops.A st ep l oop, as a screen obj ect , i s si mpl y a ser i es off i el d r ows t hat appear as a repeat i ng bl ock. A t abl econt r ol , as a scr een obj ect consi st s of : i ) t abl ef i el ds ( di spl ayed i n t he scr een ) i i ) a cont r olst r uct ur e t hat gover ns t he t abl e di spl ay and what t heuser can do wi t h i t .

Why do we need to code a LOOP st at ement i n bot h t he PBOand PAI event s f or each t abl e i n t he scr een ?

We need t o code a LOOP st at ement i n bot h PBO and PAIevent s f or each t abl e i n t he scr een. Thi s i s because theLOOP st at ement causes t he scr een f i el ds t o be copi ed backand f or t h bet ween t he ABAP/ 4 pr ogr am and t he scr eenf i el d. For t hi s r eason, at l east an empt yLOOP. . . . . . ENDLOOP must be t here.

 The f i el d SY- STEPL r ef er s t o ___________________ . The i ndex of t he scr een t abl e r ow t hat i s cur r ent l y bei ngpr ocessed. The syst em var i abl e SY- STEPL onl y has ameani ng wi t hi n t he conf i nes of LOOP. . . ENDLOOP pr ocessi ng.Out si de t he l oop, i t has no val i d val ue.

How can we decl are a t abl e cont r ol i n t he ABAP/ 4 pr ogr am?Usi ng t he syntax cont r ol s <t abl e cont r ol name> t ypet abl evi ew usi ng scr een <scr no>.

Di f f er ent i at e bet ween st at i c and dynami c st ep l oops.St ep l oops f al l i nt o t wo cl asses: St at i c and dynami c.St at i c st ep l oops have a f i xed si ze t hat cannot bechanged at r unt i me. Dynami c st ep l oops ar e var i abl e i nsi ze. I f t he user r e- si zes t he wi ndow t he syst em

aut omat i cal l y i ncr eases or decr eases t he number of st epl oops bl ocks di spl ayed. I n any gi ven scr een you candef i ne any number of st at i c st ep l oops but onl y a si ngl edynami c one.

What are t he t wo ways of pr oduci ng a l i st wi t hi n at r ansact i on ?By submi t t i ng a separ at e r epor t .

Page 63: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 63/83

By usi ng l eave t o l i st - pr ocessi ng.

What i s t he use of t he st at ement Leave t o l i st - pr ocessi ng?Leave t o l i st - pr ocessi ng st at ement i s used t o pr oduce a

l i st f r om a modul e pool . Leave t o l i st - pr ocessi ngst at ement al l ows t o swi t ch f r om di al og- mode t o l i st - modewi t hi n a di al og pr ogr am.

When wi l l t he cur r ent scr een pr ocessi ng ter mi nat es ?A cur r ent scr een pr ocessi ng t er mi nates when cont r olr eaches ei t her a Leave- scr een or t he end of PAI .

How i s t he command Suppress- Di al og usef ul ?Suppr essi ng ent i r e screens i s possi bl e usi ng t hi scommand. Thi s command al l owsus t o per f or m scr een pr ocessi ng “i n t he backgr ound”. Thesyst em car r i es out al l PBO and PAI l ogi c, but does notdi spl ay t he scr een t o t he user . Suppr essi ng scr eens i susef ul when we ar e br anchi ng to l i st - mode f r om at r ansact i on di al og st ep.

What happens i f we use Leave t o l i st - pr ocessi ng wi t houtusi ng Suppr ess- Di al og ?I f we don' t use Supr ess- Di al og t he next scr een wi l l bedi spl ayed but as empt y.when the user pr esses ENTER, t he st andar d l i st out put i sdi spl ayed.

How t he t r ansact i ons t hat are pr ogr ammed by t he user canbe pr otect ed ?By i mpl ement i ng an aut hor i t y check.

What ar e t he modes i n whi ch any updat e t asks wor k ?Synchr onous and Asynchronous.

What i s t he di f f erence bet ween Synchr onous andAsynchronous updat es ?A pr ogr am asks t he syst em t o per f or m a cer t ai n t ask, and

t hen ei t her wai t s or doesn' t wai t f or t he t ask t o f i ni sh.I n synchr onous pr ocessi ng, t he pr ogr am wai t s: cont r olr et ur ns t o t he pr ogr am onl y when the t ask has beencompl et ed. I n asynchr onous pr ocessi ng, t he pr ogr am doesnot wai t : t he syst em r et ur ns cont r ol af t er mer el y l oggi ngt he r equest f or execut i on.

Page 64: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 64/83

What i s t he di f f er ence bet ween Leave Transact i on and Cal l Tr ansact i on ?- I n cont r ast t o LEAVE TO TRANSACTI ON, t he CALL TRANSACTI ON st at ement causes t he syst em t o st ar t a newSAP LUW . Thi s second SAP LUW r uns par al l el t o t he SAP

LUW f or t he cal l i ng t r ansacti on.

Over al l how do you wr i t e t r ansact i on pr ogr am i n SAP?Cr eat e t he t r ansact i on usi ng obj ect br owser ( SE80)Def i ne t he obj ect s e. g. scr een, Tr ansact i ons. – Modul es –PBO, PAI .And you can cr eat e a t r ansact i on f r om SE93 al so.

Does SAP has a GUI scr een pai nt er? I f yes What operat i ngsyst ems i s i t avai l abl e on? What i s t he ot her t ype ofscr een pai nt er cal l ed? YesOn what OS i s i t avai l abl e – Wi ndow based.Ot her t ype of scr een pai nt er – al pha numer i c scr eenpai nt er .

What ar e st ep l oops? How do you program page down page upi n st ep l oop?St ep l oops: Met hod of di spl ayi ng a set of r ecor ds.Page down & Page up: decr ement / i ncr ement base count erI ndex = base + sy- st ep1 – 1

Nor mal l y how many and what f i l es get cr eated when at r ansact i on pr ogr am i s wr i t t en? What i s t op XXXXXXTOPprogram?Mai n pr ogr am wi t h A I ncl udesI ) TOP I NCLUDE – GLOBAL DATAI I ) I ncl ude f or PBOI I I ) I ncl ude f or PAII V) i ncl ude f or For ms

Wher e i s pr ocessi ng l ogi c l ocat ed i n an on- l i ne pr ogr am?

Ans : - ABAP/ 4 pr ogr am ( modul e pool )

Descr i be t he onl i ne pr ocessor . What i s i t s f unct i on?Ans : - Cont r ol s t he f l ow of onl i ne pr ogr am.

How ar e scr een names def i ned? Do you cr eate a scr eenf i r st or def i ne your pr ogr am f i r st?Ans : - Def i ne t he pr ogr am f i r st and t hen cr eat e a scr een.

Page 65: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 65/83

 What does PBO st ands f or ? When i s t he PBO l ogi cper f ormed?Ans : - PROCESS BEFORE OUTPUT –Pr ocessed bef or e t he scr eeni s di spl ayed.

What does PAI st ands f or? When i s t he PAI l ogi cper f ormed?Ans : - PROCESS AFTER I NPUT –Pr ocessed af t er t he user haspressed ENTER.

How i s dat a passed f r om t he screen f i el ds t o t he ABAP/ 4program?Ans : - Thr ough t he f l ow l ogi c.

What does t he TOP I ncl ude do f or you as a pr ogr ammer?Ans: For gl obal decl ar at i ons.

What are t he st eps i n cr eat i ng scr een?Wher e are t he modul e st at ement decl ared? Wher e i s t hel ogi c wi t hi n each modul e?Ans : -1. Go t o SE41 ( Scr een Pai nt er )Ent er t he pr ogr am name and scr een number . Press Ent er .2. Desi gn t he scr een and save, check and act i vat e i t .

Modul e st at ement s ar e i n t he f l ow l ogi c wi t hi n eachmodul e i s i n the ABAP/ 4 modul e pool

Progr am.

What i s t he si gni f i cance of t he wor d ‘ OUTPUT’ i n t hedecl ar at i onMODULE TEST_KNOWLEDGE OUTPUT

ENDMODULE.Ans : - Then we know t hat i t i s par t of t he PBO, t her ef or ei s processed bef or e the screen i s present ed.

Descr i be t he f i el ds on t he scr een ?

Ans : - At t r i but es scr een , Screen t ypes , f ol l ow upscr eens , cur sor posi t i on et c. Af t er you have ent er ed t hescr een number , t he scr een br anches t o t he scr eenat t r i but e mai nt enance. Ent er a shor t descr i pt i on , sel ectt he t ype NORMAL and speci f y t he number of t he f ol l ow- upscr een.

Page 66: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 66/83

What ar e t he t hree component s of ON- LI NE pr ogr am?Ans : - Scr een , ABAP/ 4 pr ogr am and t r ansact i on code.

What i s gai ned by usi ng t he Di ct i onary Fi el ds menu opt i onwhen cr eat i ng your scr een?

Ans : - The f i el ds you have cr eat ed i nher i t s t he sameat t r i but es as t hose i n t he Dat a Di ct i onar y.

How t o Cr eat e a checkbox , f r ame, pushbut t ons and radi obut t ons on a scr een?Ans : - J ust t ype a name and go t o gr aphi c el ement pushbut t on.

How do you assi gn an OK_CODE f or a push but t on? How i t i sused i n your ABAP?Ans : - I n t he f i el d l i st , name t he el ement and gi ve i tt he val ue that i t wi l l r epr esent when pushed You mustmake sur e t hat you cl ear t he f i el d t hat r epr esent s t hepushbut t on af t er ever y check.What aut omat i c checks does t he scr een per f or m? ( shoul d befour)

Descr i be al l f our and how t hey ar e used?Ans : - The f i el d f or mat , r equi r ed i nput , a f or ei gn keyt abl e , par amet er s.

What are the two met hods t o decl are i nput f i el d asmandat or y?

I f you set r equi r ed f i el d as pr ogr am at t r i but e, t he usermust ent er a val ue i n t he f i el d. Requi r ed f i el ds appearon t he scr een cont ai ni ng a quest i on mar k ( ?) .

How does f or ei gn key wor k? What you have to put i n yourscr een t o i dent i f y the f or ei gn key?No? Then wher e i s t he f or ei gn key i dent i f i ed?Ans : - You have def i ned a scr een f i el d by ref er r i ng t o aDat a Di ct i onary, whi ch has a check t abl e. When t hef orei gn key i s checked t he syst em compares t he val ues of

t he f i el ds t o be checked wi t h t he cont ent s of t he keyf i el ds of t he cor r espondi ng t abl e.

What ar e t he t wo ef f ect s of t he f or ei gn key f r om a userst andpoi nt ?Ans : - Possi bl e ent r i es & a check agai nst t he key f i el dcont ent s.

Page 67: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 67/83

What i s user def i ned val i dat i on checks i n t he f l ow l ogi c?Ans : - FI ELD…SELECT FI ELD…VALUES or i n t he modul e poolFI ELD…MODULE.

Does t he val ue command i n t he f l ow l ogi c go i n t he PAI or

t he PBO event ?Ans : - PAI .

I f an er r or occur s i n t he modul e pool , whi ch f i el ds ar eavai l abl e f or ent r y and whi ch ar e di spl ay onl y f i el ds?Ans : - Onl y t hose f i el ds def i ned wi t h t he FI ELD st at ementbef ore MODULE & r el evant checks i n a chai n.

When i s t he chai n command used i n t he PBO event ?Ans : - I f you want t o make more than one f i el d r eady f ori nput af t er an er r or .

What t abl e st ores t he onl i ne messages? What i s t hemessage cl ass and what i s i t s si gni f i cance?Ans : - Tabl e T100. The message cl ass i s a speci f i c cl assof messages f or a gr oup of t r ansact i ons.

What are t he 5 di f f erent message t ypes and how are t heyhandl ed by t he syst em? What i s t hen di f f erence betweent he War ni ng and Er r or messages?Ans : -A : Abend Message di spl ayed on t he cur r ent scr een andsubsequent t ask t ermi nat ed

I : I nf or mat i on Message di spl ayed on t he cur r ent scr een ,but user can cont i nue progr am by pr essi ng ENTERE: Er r or Message di spl ayed on the cur r ent scr een. Wi t hFI ELD st at ement s , t he f i el ds concerned become r eadyagai n f or i nput and user i s r equi r ed t o make t he ent r y/ ent r i es agai nW : War ni ng As E message , but cor r ect i ng i nput i sopt i onalS: Success Message di spl ayed on the f ol l ow- up scr een asan I message.

What does WI TH st at ement add t o a message?Ans : - I n t he pl ace of t he & or $ t he f i el ds or val uesare pl aced i n t he er r or message.

What ef f ect does t he FI ELD st atement have wi t hi n the f l owl ogi c?Ans : - The f i el d st at ement r eset s t he f i el ds so t hosef i el ds ar e r eady f or i nput agai n.

Page 68: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 68/83

 Wher e are t he messages di spl ayed on t he scr een?Ans : - At t he bot t om.

I s t he SET PARAMETER st at ement t o be i ssued i n PBO or PAI

modul e? Why?Ans : - PAI , t he val ue must be i nput i nt o t he f i el ds f i r stbef or e i t can be pl aced i n t he buf f er .

Wher e does t he GET PARAMETER st at ement get i t s val ues?Whi ch f i el d get s popul at ed wi t h t he new val ue?Ans : - Fr om t he buf f er .

Wher e can t he SET CURSOR command be execut ed? What i s i t sef f ect ?Ans : - I n PBO, To posi t i on t he CURSOR i n a par t i cul arf i el d af t er t he scr een i s di spl ayed.

What ar e t he mat ch codes and how do t hey af f ect t hescr een f i el d? Wher e ar e t hey speci f i ed i n t he onl i neprogram?Ans : - I n t he Pr oper t i es wi ndow of t he Fi el d.

What i s t he ef f ect of an ON CHAI N- REQUEST command i n yourf l ow l ogi c?Ans : - When val ue of any of t he f i el ds bet weenCHAI N…. . ENDCHAI N i s at t empt ed t o change.

What commands ar e used t o change dat abase t abl e ent r i es?Ans : -

How can you check i f t he changes t o t he dat abase weresuccessf ul ?Ans : -

What i s t he di f f er ence bet ween t he Long f orm and t heshor t f orm of maki ng dat abase changes?Ans : - Long Form:Updat e MARA and set br gew = 0 where mat nr = ‘ MAT! ’ .

 Thi s i s a st andar d Or acl e St at ement t o modi f y t he ent r yi n the Dat abase.Shor t Form:MARA- MATNR = ‘ MAT1’ . MARA- BRGEW = 0.Modi f y MARA. Thi s i s an SAP def i ned st at ement t o modi f y t he t abl e.I t i s mor e secur e and consi st ent .

Page 69: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 69/83

What i s t he advant ages usi ng t he SAP l ong f orm over t heshort f or m of dat abase changes?Ans : - May be Fast Ef f ect .

Can ‘ wher e’ cl ause be used when updat i ng dat abase

ent r i es?Ans : - Yes.

Descr i be ar r ay oper at i ons and t hei r advant ages?Ans : -

What i s l ogi cal uni t of wor k? How i s i t def i ned?Ans : - Logi cal Uni t of wor k i s a bl ock of memor y ar eawhere dat abase cont ent s are st ored and mani pul at ed.For ever y SAP appl i cat i on LUW i s aut omat i cal l y cr eat edf or dat abase communi cat i on. Besi des t hi s we have SAP LUWs al so t her e.

What f unct i on i s per f or med by t he commi t wor k command?Ans : - When you per f or m Commi t , al l t he LUW s wor k wi l lbe ref l ect ed t o the dat abase.

Why i s i t so i mpor t ant f or a pr ogr ammer t o check t he l ockent r i es?Ans : - To f i nd out i f r ecor d i s l ocked and al so t omai nt ai n dat a i nt egr i t y.

How can you f i nd a l ock ent r y f or a database t abl e?

Ans : - The f unct i on modul e ‘ ENQUEUE <l ock obj ect >’ checkswhether a l ock was t r i gger ed f or t he same obj ect .Ot her wi se an except i on FOREI GN_LOCK i s car r i ed out . I ft he obj ect i s not l ocked t he f unct i on modul e sets t hel ock.

What st eps ar e necessary t o set a l ock on a record wi t hi na database t abl e?Ans : -Execut e CALL FUNCTI ON st at ementCALL FUNCTI ON “ENQUEUE <l ock obj ect ’ >

EXPORTI NG…EXCEPTI ONS…CASE SY- SUBRC...ENDCASE.

Page 70: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 70/83

How do you unl ock t he ent r y? Why i s t hi s necessary?Ans : -Execut e t he CALL FUNCTI ON st at ementCALL FUNCTI ON ‘ DEQUEUE <l ock obj ect >’EXPORTI NG…

I t i s i mpor t ant t o unl ock t he ent r y so ot her s can updat ei t .

What i s t he di f f er ence bet ween ‘ CALL SCREEN # # # ‘ and‘ SET SCREEN ### ’… LEAVE SCREEN?Ans : -SET SCRREN st at ement set s or overwr i t es t he f ol l ow- upscr een.LEAVE SCREEN execut es t he scr een number cur r ent l y i n t hef ol l ow- scr een f i el dCALL SCREEN i nt er r upt s t he pr ocessi ng of t he cur r entscr een t o cal l a new scr een or a chai n of scr eens,pr ocessi ng of t he cur r ent scr een i s r esumed di r ect l yaf t er t he cal l .

Af t er a CALL SCREEN command where does t he pr ocessi ngr et ur n af t er t he scr een has been execut ed?Ans : - I t r et ur ns t he pr ocessi ng t o t he cal l i ng screen.

Whi ch i s t he mor e si mi l ar t o a cal l wi t h r et ur n, t he SETSCREEN or t he CALL SCREEN?

Ans : - The CALL SCREEN command.

What f unct i on i s per f or med by t he SET SCREEN 0 command?Ans : - Ret ur ns t o t he or i gi nal screen.

What are t he mai n di f f erences between t he r epot st at usand scr een st atus?Ans : -

Wher e must you pl ace t he SET PF- STATUS command i n youronl i ne pr ogr am?

Ans : - Pl ace i t i n t he PBO modul e of t he scr een.

Why i s i t good i dea t o cl ear OK_CODE f i el d af t er deci di ngwhi ch act i on t o t ake?Ans : - You need t o cl ear t he OK code to avoi d sendi ng ascr een t hat al r eady has a f unct i on code.

Page 71: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 71/83

How do you speci f y t hat a f unct i on i s an exi t t ypecommand?Ans : - By speci f yi ng f unct i on t ype E f or t he pushbut t onsor menu opt i ons i n t he scr een pai nt er or menu pai nt er .What i s t he pur pose of t he ‘ AT EXI T- COMMAND’ ?

Ans : - Usual l y t here are many ways t o l eave a scr een( back, exi t , cancel ) . Thi s command wi l l per f or m t er mi nat i onl ogi c f or al l f unct i ons of t ype E.

What are scr een gr oups?Ans : - A gr oup of scr een f i el ds such as r adi o but t ons orcheckboxes.

What i s t he cor r ect synt ax f or dynami cal l y modi f yi ng al ar ge number of scr een f i el ds?Ans : -MODULE MODI FY _SCREEN_OUTPUT...LOOP AT SCREENI F SCREEN –GROUP = 3D ‘ GR1’SCREEN- I NPUT=3D 1ENDI F.I F SCREEN- NAME = 3D ‘ TAB- FI ELD’SCREEN- ACTI VE=3D 0.ENDI F.MODI FY SCREEN.

ENDLOOP.

What i s t he name of t he i nt er nal t abl e t hat st or es t hescr een i nf or mat i on?Ans : - SCREEN.

What i s t he purpose of t he MODI FY command when per f or mi ngt he dynami c scr een modi f i cat i ons?Ans : - af t er you act i vat e or deact i vat e t he f i el dat t r i but es by assi gni ng t hem 1 or 0, you save t hemodi f i cat i ons vi a MODI FY SCREEN command.

Di r ect i on f or t he use of check box and r adi o but t ons i nscr een pai nt er ?Ans : -Cr eat i ng Radi o But t on and Check Boxes on t he scr eenGo t o t he f ul l screen edi t or .Pl ace an underscor e at t he poi nt where you want t o pl acet he f i el d.

Page 72: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 72/83

Def i ne t he name of t he f i el d usi ng <Fi el d At t r i but es>Pl ace t he cursor on t he f i el d and pr ess <Gr aphi c el ement > Then press <Radi o But t ons> or <Check boxes> dependi ng onwhi ch graphi c el ement you want Then you group r el at ed check boxes and r adi o boxes.

What ar e user Exi t s and t r ansact i ons?Ans : - Gener al l y, user exi t s ar e t he f or ms def i ned wi t hi nSAP standar d code ( usual l y star t i ng wi t h user exi t ) . These predef i ned ar eas i n t he code al l ow pr ogrammer s t oi nser t cust om def i ned code i nt o the st andar d pr ocessi ngof a t r ansact i on ( e. g. al l ow r esor t i ng of t he bat chsequence i n VA01 bat ch pr ocessi ng) . There ar e manyspeci f i c exampl es i f you ar e i nt er est ed, but usual l y userexi t s are sear ched f or when a speci f i c use i s bei nganal yzed.

What happens i f you ent er 0 i n NEXT Scr een at t r i but e?Ans : - I t does not go t o any ot her scr een and i t movesback one l evel . However you can cont r ol t hi s i n r un- t i meusi ng SET SCREEN command.

How t o modi f y t he at t r i but es of scr een f i el ds at r un t i me?.We l oop t hr ough t he f i el ds of t he scr een. When you f i ndt he name of a scr een f i el d you want t omodi f y, set at t r i but es f or t he f i el d and use MODI FYSCREEN t o updat e t he

at t r i but es.

 You can f i nd t he at t r i butes i n t he i nt er nal t abl e SCREEN. Thi s l oop makes some of t he scr een f i el ds i nvi si bl e and asel ect i on scr een:AT SELECTI ON- SCREEN OUTPUT.LOOP AT SCREEN.I F scr een- name = ' P_VERAB' ORscr een- name = ' P_STXT1' ORscr een- name = ' P_STXT2' ORscr een- name = ' %_P_VERAB_%_APP_%- TEXT' OR

scr een- name = ' %_P_STXT1_%_APP_%- TEXT' ORscr een- name = ' %_P_STXT2_%_APP_%- TEXT' .

screen- act i ve = ' 0' .MODI FY SCREEN.ENDI F.ENDLOOP.

Page 73: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 73/83

How t o l eave dynpr o al t hough r equi r ed ent r y not made ?

I n t he menu pai nt er - Funct i on at t r i but es f or t he but t on,set Funct i onalt ype t o E ( Exi t command)

PROCESS AFTER I NPUT.Cal l modul e t hat l eaves scr een bef ore User _Command_xxxxi s execut ed

MODULE Ret ur nExi t AT EXI T- COMMAND.MODULE user _command_1000.

MODULE r etur nexi t .CASE sy- ucomm.WHEN ' CANC' . "Or what ever you want t o cal l i tCl ear w_scr een.LEAVE TO SCREEN 0.

ENDCASE.ENDMODULE.

Cal l i ng a r epor t f r om a dynpr o

 There ar e t o ways t o do t hi s:Use l eave t o l i st - pr ocessi ng i f you want t o do i t i n yourmodul e pool . You wi l l not be abl e to usesel ect i on- screens.

Use t he submi t st at ement t o st ar t a seper at e r epor t f r omyour dynpr o.Anyone who have i dea on how t o know t he sel ect ed val ue onr un- t i me?How can get t he tabl e cont r ol at t r i but e sel ect ed val ue ?I t r y t o read t he val ue i n debugger whi ch i s #( t abl e_cont r ol - col s- sel ect ed) . Ther e i s no di f f er ence ont he ot her r ow whi ch i s not sel ect ed.

 The t c- col s- sel ect ed i s f or col umn sel ect i on onl y. Forr ow sel ect i on you have t wo scenar i os

t ur n on t he Sel Col umn at t r i but e i n scr een pai nt er , gi vei t a name and decl ar e an abap var i abl e wi t h t he same namet ype C l engt h 1. I n your PAI l oop at i t ab, when t hesel ect ed r ow i s pr ocessed t he abap var i abl e wi l l = ' X' .At t hi s poi nt you can save t he r ecor d or key.

you can determi ne whi ch row t he cursor i s on i n your

Page 74: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 74/83

t abl e cont r ol as f ol l ows:

DATA: LI NE_SEL LI KE SY- STEPL, TABI X LI KE SY- TABI X

GET CURSOR LI NE LI NE_SEL. TABI X = <t abl e cont r ol >- TOP_LI NE + LI NE_SEL - 1.

 TABI X i s now t he i ndex of t he sel ect ed r ow.

F4 Hel p - Cal l i ng i t f r om a pr ogr am and l i mi t i ng val ues ?

 To avoi d t he st andar d F4 hel p t o be show, i nser t t heevent PROCESS ON- VALUE- REQUEST i n t he pr ogr am and add af i el d st at ement f or t he f i el d t hat shoul d t r i gger t he F4hel p. I n t he modul e cal l ed f r om

PROCESS ON- VALUE- REQUEST, cal l f unct i on modul eF4I F_FI ELD_VALUE_REQUEST.

Exampl e 1 - Dynpr o

pr ocess bef or e out put .. . . . .

pr ocess af t er i nput .. . . . .

PROCESS ON VALUE- REQUEST.FI ELD i t _zsd00003- pr ct r MODULE f 4_hel p_f or _pct r .

MODULE f 4_hel p_f or_pct r I NPUT.

NOTE: Tabname/ f i el dname i s t he name of t he t abl e and f i el df or whi ch F4 shoul d be shown.*

Dynpr og/ Dynpnr / Dynpr of i el d are the names of t hePr ogr an/ Dynpr o/ Fi el di n whi ch t he f 4 val ue shoul d be r et ur ned.*Val ue: The val ue of t he Dynpr o f ui el d when cal l i ng t he F4hel p.

Page 75: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 75/83

 You can l i mi t t he val ues shown, by i nser t i ng a val ue i nt hi s paramet ere. g ' 50*' t o show onl y val ues begi nni ng wi t h 50

CALL FUNCTI ON ' F4I F_FI ELD_VALUE_REQUEST'

EXPORTI NGt abname = ' ZSD00003'f i el dname = ' PRCTR'* SEARCHHELP = ' '* SHLPPARAM = ' 'dynppr og = ' ZSD00002_BRUGERKONV_LI STE'dynpnr = ' 0100'dynpr of i el d = ' I T_ZSD00003- PRCTR'* STEPL = 0val ue = ' 50*'* MULTI PLE_CHOI CE = ' '* DI SPLAY = ' '

* SUPPRESS_RECORDLI ST = ' '* CALLBACK_PROGRAM = ' '* CALLBACK_FORM = ' ' TABLES* RETURN_TAB =EXCEPTI ONS* FI ELD_NOT_FOUND = 1* NO_HELP_FOR_FI ELD = 2* I NCONSI STENT_HELP = 3

* NO_VALUES_FOUND = 4* OTHERS = 5.I F sy- subr c <> 0.MESSAGE I D SY- MSGI D TYPE SY- MSGTY NUMBER SY- MSGNOWI TH SY- MSGV1 SY- MSGV2 SY- MSGV3 SY- MSGV4.

ENDI F.

ENDMODULE. " F4_hel p_f or _pct r I NPUT.

What you can do wi t h a t r ansact i on var i antI nser t def aul t val ues i nt o f i el dshange t he r eady f or i nput st at us f or f i el dsHi de var i ous scr een el ement s, menu f unct i ons or ent i r escr eensAdj ust t abl e cont r ol set t i ngsNot e: Tr ansact i on var i ant s can onl y be used wi t h di al og

Page 76: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 76/83

t r ansacti ons.

How t o cr eat e a t r ansact i on var i ant Tr ansact i on var i ant s ar e cr eat ed wi t h t r ansact i on: SHD0I n the f i el d Tr ansact i on on SHD0 ent er t he t r ansact i on

code f or t he scr een you want t po modi f y (E. g. VA03) . I nt he f i el d Var i ant on SHD0 ent er t he name you want t o gi vet he t r ansact i on var i ant ( E. g. ZVA03)Press Cr eateNow t he scr een f or t he t r ansact i on i s shown and you canent er def aul t val ues i n t he f i el ds of t he scr eenPress Ent er . Now a scr een t hat enabl es you t o makef ur t her cust omi zi ng ( Hi de, Out put onl y, I nvi si bl e,Mandat or y) i f t he scr een f i el ds i s shown.Af t er you have f i ni shed cust omi zi ng t he scr een pr essEnt er t o go to the next scr een or ave and exi t t o savet he Tr ansact i on var i ant

How t o f i nd user exi t sDi spl ay t he pr ogr am wher e you ar e sear chi ng f or and exi tand search f or CALL CUSTOMER- EXI TI f you know t he Exi t name, go t o t r ansact i on CMOD. Choosemenu Ut i l l i t i es- >SAP Enhancement s. Ent er t he exi t nameand pr ess ent er .

 You wi l l now come t o a scr een t hat shows t he f unct i onmodul e exi t s f or t he exi t .

Usi ng Pr oj ect management of SAP Enhancement s

We want t o cr eat e a pr oj ect t o enhance t r ansact i on VA01Go t o t r ansact i on CMODCr eat e a pr oj ect cal l ed ZVA01Choose t he Enhancement assi gn r adi o but t on and press t heChange but t onI n t he f i r st col umn ent er V45A0002 Pr edef i ne sol d- t opar t y i n sal es document . Not e t hat an enhancement canonl y be used i 1 pr oj ect . I f t he enhancement i s al l r eadyi n use, and er r or message wi l l be di spl ayed

Press SavePr ess Components. You can now see that enhancement usesuser exi t EXI T_SAPMV45A_002. Doubl e cl i ck on t he exi t .

Now t he f unct i on modul e i s di spl ayed. Doubl e cl i ck oni ncl ude ZXVVAU04 i n t he f unct i on modul eI nser t t he f ol l owi ng code i nt o t he i ncl ude: E_KUNNR =' 2155' .

Page 77: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 77/83

Act i vate t he i ncl ude pr ogr am. Go back t o CMOD andacti vat e t he pr oj ect.Got o t r ansact i on VA01 and cr aet e a sal esor der . Note t hatSol d- t o- par t y now aut omat i cal l y i s " 2155" To r un t he t r ansact i on var i ant , you must cr eat e a new

 Tr ansact i on code i n SE93 t hat r ef er s t o t he Tr ansact i onvar i ant . Choose Tr ansact i on wi t h var i ant as St ar t obj ect .

Not e: The t r ansact i on var i ant can al so be cal l ed f r om apr ogr am t hat i ncl udes a cal l t o f unct i on modul eRS_HDSYS_CALL_TC_VARI ANT

Can a f i el d exi t on a scr een access t he val ues ent er ed bya user on t hat scr een f or t he scr een f i el ds ot her t hant he f i el d f or whi ch t he exi t has been appl i ed. i f yest hen how?Maybe t hi s f unct i on hel ps you: DYNP_VALUES_READ. I t r eadst he dynpr o- val ues bef or e pr ocessi ng PAI .

What are event s i n di al ogs?Process Bef ore Out put andPr ocess Af t er I nput .Process On Val ueProcess On Hel pModul e out put .Modul e i nput .

What are si gni f i cance of PBO and PAI ?

Bef or e di spl ay the screen PBO i s f i r ed. Thi s i s f orscr een di spl ayAf t er gi vi ng t he user i nput PAI i s f i r ed. Thi s i s f ori nput val i dat i on

Wher e you wi l l val i dat e ent r i es i n t he f i el ds?Ent r i es can be val i dat ed i n PAI . You can val i dat e i n Fi el d Exi t s al so.

What i s use of Chai n and EndChai n?

For cal l i ng a par t i cul ar PAI modul e i f any one of f i el dsi n a gr oup meet s a condi t i on, we use t o combi ne al l suchf i el ds .

How t o change scr een dynami cal l y?By modi f yi ng t he scr een at t r i but es.

Page 78: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 78/83

How t o capt ur e changes on t he scr een f i el ds? Same i n caseof t abl e cont r ol ?We can capt ure changes on t he scr een f i el ds usi ng modul eon i nput and on r equest .

I f you ar e val i dat i ng cont ent s of f i el d but user want t oexi t f r om t he t r ansact i on wi t hout val i dat i ng cont ent s;How t o handl e t hi s scenar i o?By at exi t - command we can do.

How t o pass f i el d val ues f r om one scr een t o ot her scr een?By usi ng set and get parameter i d st at ement s.

What i s t he di f f erence i n usi ng COMMI T WORK wi t hi n acal l ed t r ansact i on and wi t hi n a cal l ed di al og modul e i nan exi st i ng modul e.Ans. : Tr ansact i on: I t wi l l cr eat e a new LUW and so you have t osay COMMI T WORK i n a cal l ed t r ansact i on f or get t i ng anyof t he updat e st at ement s t o be f r ui t f ul i nsi de t he cal l edt r ansacti on.Di al og modul e: Si nce no new LUW i s cr eated, COMMI T WORKi s not necessar y.

Whi ch 2 t r ansact i on codes are used t o manageenhancement s?Ans: SMOD and CMOD

Whi ch enhancement i s l ocal , whi ch i s gl obal :Fi el d Exi t sScr een Exi t sPr ogr am Exi t sMenu Exi t s

Wher e can you cr eat e an enhancement t o show your own F1Hel p on a f i el d?Ans: i n POH

What enhancement s can be cr eat ed usi ng Cmod?

Ans: Cust omer Enhancement s, i . e. , Fi el d Exi t s.

What i s t he code f or showi ng a l i st pr oduced i n a di al ogprogram?Ans: Leave scr een.Leave t o Li st - pr ocessi ng.OrSubmi t <pr ogr am name>.

Page 79: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 79/83

 When i s f i el d Name1 t r anspor t ed t o the pr ogr am i n t hi scodi ng:Pr ocess Af t er I nput .Modul e ABC.

Fi el d Name1 Modul e DEF.

What i s t he ef f ect of SUPPRESS DI ALOG i n PBO?Fi el d Name2 Modul e GHI .

I f an err or message was r ai sed i n Modul e GHI , whi chf i el ds woul d be r eady f or i nput ?Ans: The f i el ds t hat ar e pl aced i n CHAI N………ENDCHAI N.

I n whi ch 2 pl aces coul d you set t he GUI st atus and t i t l ebar f or a modal di al og box?

What does CHAI N . . . . END CHAI N do?Somet i mes you want t o check sever al f i el ds as a gr oup. Todo thi s, i ncl ude t he f i el ds i n a FI ELD st at ement , andencl ose ever yt hi ng i n a CHAI N- ENDCHAI N bl ock.Exampl e**** Screen f l ow l ogi c: ****CHAI N.FI ELD: SPFLI - CARRI D, SPFLI - CONNI D.MODULE CHECK_FLI GHT.ENDCHAI N.When an er r or i s f ound i nsi de a chai n, t he scr een i s r e-

di spl ayed, and al l f i el ds f ound anywher e i n t he chai n ar ei nput - enabl ed. Al l non- chai n f i el ds remai n di sabl ed.

How can you t est f l ow l ogi c?Check f unct i on checks t he synt ax, data- consi st ency andscr een l ayout of t he scr een. To t est t he synt ax, f r om t he menu pat h choose scr een- - - ->check- - - - - - - > synt ax. To t est t he dat a consi st ency, f r om t he menu pat h choosescreen- - - - >check- - - - - - > consi st ency. To check t he l ayout , f r om t he menu pat h choose scr een- - - -

- >check- - - - - >l ayout .

What happens i f you choose hol d dat a opt i on i n scr eenat r i but es? To r et ai n dat a enter ed by a user . The syst emaut omat i cal l y di spl ays t hi s dat a i f t he user r et ur ns t ot hi s scr een.

Page 80: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 80/83

 What happens i f you ent er 0 i n NEXT scr een at t r i but e?

I n ABAP/ 4 each st ackabl e sequence of scr eens i s a "cal lmode". Thi s i s i mpor t ant because of t he way you r etur n

f r om a gi ven cur r ent sequence. To t er mi nat e a cal l modeand r et ur n t o a suspended chai n, set t he "next scr een" t o0 and l eave t o i t . When you r etur n to t he suspendedchai n, execut i on r esumes wi t h t he st at ement di r ect l yf ol l owi ng t he or i gi nal CALL SCREEN st atement . Theor i gi nal sequence of screens i n a t r ansact i on i s i t sel f acal l i ng mode. The or i gi nal sequence of scr eens i n at r ansact i on i s i t sel f a cal l i ng mode. I f you LEAVE TOSCREEN 0 i n thi s sequence ( t hat i s, wi t hout havi ngst acked any addi t i onal cal l modes) , you r et ur n f r om t het r ansact i on al t oget her .

How many menu t i t l es you can have i n a mai n menu? You can have si x menus i n a menu bar . I n addi t i on t o t hi ssyst em pr ovi des t wo more menus i . e. syst em and hel p. Youcan have onl y one menu bar f or a st at us. You can mai nt ai n 15 ent r i es i n a menu and up t o t hreel evel s .

What i s t he di f f er ence bet ween t he "change on- i nput " and"Change on r equest " i n the PAI of a scr een?

• ON I NPUT

 The ABAP/ 4 modul e i s cal l ed onl y i f t he f i el d cont ai ns aval ue ot her t han i t s i ni t i al val ue. Thi s i ni t i al val ue i sdet er mi ned by t he f i el d' s dat a t ype: bl anks f or char act erf i el ds, zer oes f or numer i cs.

• ON REQUEST The ABAP/ 4 modul e i s cal l ed onl y i f t he user has enter eda val ue i n t he f i el d val ue si nce t he l ast screen di spl ay. The val ue count s as changed even i f t he user si mpl y t ypesi n t he val ue t hat was al r eady t her e.

What ar e user exi t s? What i s i nvol ved i n wr i t i ng them?What precaut i ons are needed?User def i ned f unct i onal i t y i ncl uded t o pr edef i ned SAPst andards. Poi nt i n an SAP pr ogr am where a cust omer ' s ownpr ogr am can be cal l ed. I n cont r ast t o cust omer exi t s,user exi t s al l ow devel oper s t o access and modi f y pr ogr amcomponents and dat a obj ect s i n t he st andar d syst em. Onupgr ade, each user exi t must be checked t o ensure that i t

Page 81: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 81/83

conf orms t o t he st andard syst em. There ar e t wo t ypes of user exi t :User exi t s t hat use I NCLUDEs. These ar e cust omer enhancements t hat ar e cal l ed di r ect l yi n t he pr ogr am.

User exi t s t hat use t abl es. These ar e used and managed usi ng Cust omi zi ng.Shoul d f i nd t he cust omer enhancement s bel ongi ng t opar t i cul ar devel opment cl ass.

What are t he di f f erent ways i n whi ch you can make changest o SAP st andard sof t ware ?Cust omi zi ngEnhancement s t o t he SAP St andar dModi f i cat i ons t o the SAP St andar dCust omer Devel opment

What i s cust omi zi ng ?Cust omi zi ng i s t he set t i ng of syst em par amet er s vi a SAP' sown i nt er f ace.

Why do you need enhancement s ? The st andar d appl i cat i ons do not of f er some of t hef unct i onal i t y you need. The R/ 3 enhancement conceptal l ows you t o add your own f unct i onal i t y t o SAP' sst andar d busi ness appl i cat i ons.

What are t he di f f erent t ypes of enhancement s ?Enhancement s usi ng cust omer exi t sCust omer s' pot ent i al r equi r ement s whi ch ar e not i ncl udedi n t he st andar d sof t war e ar e i ncor por at ed i n t he st andar das empt y modi f i cat i on ' shel l s' . Cust omer s can t hen f i l lt hese wi t h thei r own codi ng. Enhancement s can r el ate t opr ogr ams, menus and scr eens. Upward compat i bi l i t y i sassured. I n other words, SAP guarant ees t hat t he j umpf r om t he st andar d sof t war e t o t he exi t and t he i nt er f acewhi ch cal l t he exi t wi l l r emai n val i d i n f ut ur e r el eases.

Enhancement s t o ABAP/ 4 Di ct i onary el ement s These ar e ABAP/ 4 Di ct i onary enhancements ( cr eat i on oft abl e appends) , t ext enhancement s ( cust omer - speci f i c keywords and document at i on f or dat a el ement s) and f i el dexi t s ( creat i on of addi t i onal codi ng f or dat a el ement s) .

What i s cust omer devel opment ?Cr eat i ng cust omer - speci f i c obj ect s wi t hi n t he cust omer

Page 82: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 82/83

name range.

What i s SSCR ?SSCR ( SAP Sof t ware Change Regi st r at i on) i s a pr ocedur e,f or r egi st er i ng al l manual changes t o SAP sour ce codi ng

and SAP Di ct i onar y obj ect s.

What i s t he di f f er ence bet ween modi f i cat i ons andenhancement s ?Modi f i cat i ons mean maki ng changes t o t he SAP st andar df unct i onal i t y.Enhancement s mean addi ng some f unct i onal i t y t o SAPst andar d f uncti onal i t y.

What are t he di sadvant ages of modi f i cat i on ?Modi f yi ng st andar d code can l ead to er r or sModi f i cat i ons mean more work dur i ng sof t ware upgr ades

What ar e t he advant ages of enhancement s ?Do not af f ect st andard SAP sour ce codeDo not af f ect sof t ware upgr ades

when do you opt f or modi f i cat i on ?Cust omer exi t s are not avai l abl e f or al l pr ogr ams andscr eens wi t hi n t he R/ 3 st andar d appl i cat i ons. You canonl y use exi t s i f t hey al r eady exi st wi t hi n t he SAP R/ 3Syst em . Ot her wi se you have t o opt f or modi f i cat i ons .

What are t he var i ous t ypes of cust omer exi t s ?Menu exi t sScr een exi t sFunct i on modul e exi t sKeyword exi t s

What i s a menu exi t ?Addi ng i t ems t o t he pul l down menus i n st andard R/ 3appl i cat i ons .

13. What i s a scr een exi t ?

Addi ng f i el ds t o the scr eens wi t hi n R/ 3 appl i cat i ons. SAPcr eat es scr een exi t s by pl aci ng speci al subscr een ar easwi t hi n a st andard R/ 3 scr een and cal l i ng a cust omersubscreen f r om wi t hi n t he st andar d dynpr o' s f l ow l ogi c.

Page 83: New Enchancements Sap Flori

8/20/2019 New Enchancements Sap Flori

http://slidepdf.com/reader/full/new-enchancements-sap-flori 83/83

What i s a f unct i on modul e exi t ?

Addi ng f unct i onal i t y t o R/ 3 appl i cat i ons. Funct i on modul eexi t s pl ay a r ol e i n both menu and scr een exi t s.

What i s a keyword exi t ?

Add document at i on t o t he dat a el ement s of key wordsdef i ned i n t he ABAP/ 4 Di ct i onar y. The syst em di spl ayst hi s document at i on whenever a user pr esses F1 to getonl i ne hel p f or a scr een f i el d.

How do SAP or gani zes i t s exi t s ?

SAP or gani zes i t s exi t s i n packages t hat ar e cal l ed SAPenhancement s. Each SAP enhancement can cont ai n manyi ndi vi dual exi t s .

What i s an add- on pr oj ect ?

 To t ake advant age of t he exi t s avai l abl e wi t hi n st andar dR/ 3 appl i cat i ons, you need t o cr eat e an add- on pr oj ect . Thi s proj ect l et s you or gani ze t he enhancement packagesand exi t s you want t o use. The add- on pr oj ect al so al l owsyou t o hang add- on f unct i onal i t y ont o t he exi t hookscont ai ned wi t h SAP enhancement s. [ / nobr ]