Coding Guidelines and Standards V1.1

86
7/24/2019 Coding Guidelines and Standards V1.1 http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 1/86 CODING GUIDELINES AND STANDARDS  Project Sapiens Coding Guidelines and Standards Product Reference Number: SAP_22_010  Autor!: Andre" #$ %&'(&n!on) Anton* +$ S," St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.en P,/e 1 of

Transcript of Coding Guidelines and Standards V1.1

Page 1: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 1/86

CODING GUIDELINES AND STANDARDS 

Project Sapiens

Coding Guidelines and Standards

Product Reference Number: SAP_22_010

 Autor!: Andre" #$ %&'(&n!on) Anton* +$ S,"

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1 of

Page 2: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 2/86

CODING GUIDELINES AND STANDARDS 

Overview

Product &!tor*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3

Document Loc,t&on$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3Re-&!&on &!tor*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3

4u,'&t* Re-&e"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3

 A..ro-,'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3

1$0 Pur.o!e$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$5

1$1 Intended Aud&ence$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$5

2$0 INTRODUCTION$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

6$0 #E7 CONTACTS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$8

3$0 NA9ING CONENTION$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

3$1 O-er-&e"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

3$1$1 9odu'e ID ; Sub<9odu'e ID$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

3$2 A=AP D&ct&on,r*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$10

3$2$1 Tr,n!.,rent T,b'e!) Poo' T,b'e!) Structure!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$11

3$2$2 &e"!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$12

3$2$6 Dom,&n!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$16

3$2$3 D,t, E'ement!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$13

3$2$5 Loc( Ob>ect!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$13

3$2$ Se,rc e'.$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$15

3$6 A=AP Pro/r,m$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$1

3$6$1 Pro/r,m N,m&n/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$1

3$6$2 Re.ort ,r&,nt$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$18

3$6$6 9odu'e Poo' N,me!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$18

3$6$3 D*n.ro! ?Screen@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$20

3$6$5 GUI St,tu! ; GUI T&t'e$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$20

3$6$ Tr,n!,ct&on Code!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$22

3$3 unct&on Ob>ect!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$26

3$3$1 unct&on Grou.!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$26

3$3$2 unct&on 9odu'e!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$26

3$5 Oter Ob>ect!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$23

3$5$1 De-e'o.ment C',!!e!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$23

3$5$2 Are, 9enu!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$23

3$5$6 9e!!,/e!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$25

3$5$3 Lo/&c,' D,t,b,!e!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$2

3$ =,c(/round +ob!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$28

3$8 =,tc In.ut Se!!&on!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$2

3$ D,t,!et!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 2B

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2 of

Page 3: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 3/86

CODING GUIDELINES AND STANDARDS 

3$$1 &'e N,m&n/$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$2B

3$B L,*out Set!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$60

3$10 Tr,n!.ort Reue!t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$61

3$11 Le/,c* S*!tem 9&/r,t&on %or(benc ?LS9%@ 1$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$61

3$11$1 Pro>ect$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61

3$11$2 Sub.ro>ect$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$62

3$11$6 Ob>ect$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$62

3$12 Summ,r*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66

5$0 PROGRA99ING STANDARDS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$68

5$1 Gener,' Ru'e!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$68

5$2 Cod&n/ St*'e$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$6

5$6 Re.ort St,nd,rd$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$30

5$3 D,t, Def&n&t&on$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$32

5$5 On'&ne St,nd,rd$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$33

5$ =,tc Pro/r,m Interf,ce St,nd,rd!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$33

5$$1 Def&ne Lo/&c f&'en,me ,! .,r,meter!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$33

5$8 9e!!,/e$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35

5$ Pro/r,m Lo/&c$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$3

5$B D,t, Acce!!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$38

5$10 Intern,' T,b'e$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$56

5$11 Str&n/ O.er,t&on$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$6

$0 APPENDI < S(e'eton Pro/r,m!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$8$1 APPENDI 1$ =,!&c A=AP L&!t Re.ort$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$2 APPENDI 2$ Inter,ct&-e A=AP L&!t Re.ort$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$81

$6 APPENDI 6$ Cre,te , Seuent&,' D,t,!et$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$83

$3 APPENDI 3$ Re,d Seuent&,' D,t,!et ,nd Cre,te , =DC Se!!&on$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$88

$5 APPENDI 5$ CALL TRANSACTION USING Tecn&ue$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$1

$ APPENDI $ Gener,' Subrout&ne!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$5

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6 of

Page 4: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 4/86

CODING GUIDELINES AND STANDARDS 

Product History

Document ocation

Te e'ectron&c !ource of te document c,n be found on: -,r""",..!con-er!&ontm.!cr,tc_605122$doc

!evision History

"ersion !evision date Summary of C#anges Section Page

0$1 2006 In&t&,' dr,ft -er!&on for re-&e"

0$11 2B006 U.d,ted ,fter re-&e" b* Andre" #$ %&'(&n!on

0$12 2B006 U.d,ted "&t ED Ener/* ?Net"or(@ .ro/r,m n,m&n/con-ent&on ,nd .ro/r,m -,r&,b'e!

0$16 030B06 U.d,ted ,fter re-&e" b* Andre" #$ %&'(&n!on

0$13 00B06 U.d,ted "&t CTS reference!

1$0 10B06 U.d,ted "&t comment! from Co'&n P,'fre* ,nd r,n(Rund'e

1$1 20B06 U.d,ted ,fter re-&e" b* Su&<#",n L&

$uality !eview

Te fo''o"&n/ ,-e been nom&n,ted ,! u,'&t* re-&e"er! for t&! Product:

%ame &itle Date of 'ssue "ersions

Su&<#",n L& ED Ener/* IT

#en S,//er! =u!&ne!! A..'&c,t&on! 9,n,/er ?Net"or(!@

(pproval

T&! document reu&re! ,..ro-,' from te fo''o"&n/ &nd&-&du,'!:

?S&/ned ,..ro-,' form! ,re f&'ed &n te u,'&t* !ect&on of te .ro>ect f&'e!@

%ame !ole Date Signature

#,te ,ter'e* IT Ser-&ce! 9,n,/er < Cor.or,te

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3 of

Page 5: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 5/86

CODING GUIDELINES AND STANDARDS 

1.)Purpose

Te .ur.o!e of t&! document &! to e!t,b'&! te de-e'o.ment !t,nd,rd! ,nd n,m&n/con-ent&on! for ,'' te SAP tecn&c,' de-e'o.ment! &n Pro>ect SAPIENS$ It !er-e! ,! ,

/u&de'&ne for ,'' te de-e'o.er! to fo''o" !uc t,t , un&ue !t,nd,rd of cu!tom ob>ect! c,nbe m,&nt,&ned trou/out te .ro>ect$

Incor.or,ted "&t&n t&! document ,re ED Ener/* ?Net"or(@ !t,nd,rd! ,nd AccentureOff!ore de-e'o.ment !t,nd,rd!$

1.1 'ntended (udience

T&! document &! &ntended for u!e b* te fo''o"&n/ /rou.!:

• SAPIENS .ro>ect Cu!tom De-e'o.ment ?On!oreOff!ore@) D,t, 9&/r,t&on ,nd Proce!! ?SAP

Conf&/ur,t&on@ te,m!

• ED D,t,ub te,m

• ED On/o&n/ SAP Su..ort te,m

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5 of

Page 6: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 6/86

CODING GUIDELINES AND STANDARDS 

*.) '%&!OD+C&'O%

U!&n/ con!&!tent de-e'o.ment !t,nd,rd! ,nd n,m&n/ con-ent&on! trou/ SAP tecn&c,'de-e'o.ment "&'' not on'* contr&bute !&/n&f&c,nt t&me ,nd re!ource !,-&n/! for bot te &n&t&,'

con!truct&on ,nd 'on/ term m,&nten,nce of SAP !*!tem) but ,'!o &m.ro-e !*!tem eff&c&enc*dr,m,t&c,''*$ De-e'o.&n/ te!e !t,nd,rd! .r&or to con!truct&on ,nd ,der&n/ to tem dur&n/con!truct&on &! e!.ec&,''* e'.fu' "en ,ddre!!&n/ te fo''o"&n/:

• Im.ro-&n/ .ro/r,m eff&c&enc*

• Lon/<term m,&nten,nce of cu!tom de-e'o.ment

• uture u./r,de!

• ,c&'&t,t&n/ (no"'ed/e tr,n!fer for future SAP re!ource!

• ,c&'&t,t&n/ con!o'&d,t&on "&t oter SAP &n!t,nce! "&t&n ED Ener/*

Te ob>ect&-e of t&! m,nu,' &! to def&ne /u&de'&ne! for SAP de-e'o.er!$ Te content of tem,nu,' co-er! fo''o"&n/ to.&c!:

• N,m&n/ con-ent&on for D,t, D&ct&on,r* ?DDIC@ ob>ect!: t,b'e!) d,t, e'ement!) ,nd A=AP

.ro/r,m n,me! ,nd -,r&,b'e!$

• Cod&n/ !t*'e ,nd oter de-e'o.ment !t,nd,rd!$

• Pro/r,m eff&c&enc* concern!$

• Code tem.',te for -,r&ou! t*.e of .ro/r,m!

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e of

Page 7: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 7/86

CODING GUIDELINES AND STANDARDS 

,.) -/ CO%&(C&S

or de-e'o.ment "or() te (e* cont,ct! ,re:

• Co'&n P,'fre* De-e'o.ment ,nd 9&/r,t&on Le,d

•  Andre" #$ %&'(&n!on Con!u't&n/ De-e'o.ment Le,d

• +,t&nder S,ot, =ASIS Infr,!tructure Le,d

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 8 of

Page 8: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 8/86

CODING GUIDELINES AND STANDARDS 

0.)%('%G CO%"%&'O%

0.1 Overview

Te .o'&c&e! ,nd .rocedure! &n t&! document def&ne te def,u't n,m&n/ con-ent&onreu&rement! for ,'' SAP R6 ob>ect! ,! "e'' ,! .ro/r,mm&n/ -,r&,b'e! dur&n/ de-e'o.ment$

Te n,m&n/ con-ent&on .rocedure! ,-e been def&ned to &ncor.or,te SAPrecommend,t&on! ,nd reu&rement!$ Te!e .rocedure! "&'' en!ure d&!t&nct&on bet"eenSAP R6 !u..'&ed code ,nd de-e'o.ment cu!tom&!ed code ,nd "&'' ,''o" for , con!&!tent,..ro,c for ,'' cu!tom de-e'o.ment$

 A'' R6 te,m member! "o cre,te ob>ect! &n te SAPR6 !*!tem !ou'd fo''o" te!e/u&de'&ne! "en n,m&n/ ,n* SAP cu!tom ob>ect!$

S(P supplied o2jects s#ould not 2e modified or deleted. 'f a c#ange to a S(Psupplied o2ject is re3uired4 t#e original o2ject s#ould 2e copied to a new name4 using

t#e S(P naming conventions4 and t#e new version s#ould 2e modified.

0.1.1 odule 'D 5 Su26odule 'D

or ,'' de-e'o.ment .ur.o!e!) te ,..'&c,t&on .roce!! ID "&'' be , 3 c,r,cter f&e'd ?d&-&ded&nto 9odu'e ID ,nd , Sub<9odu'e ID for furter c,te/or&!,t&on ,nd or/,n&!,t&on@) "&c ,ct!,! ,n &dent&f&er for e,c .ro/r,m de-e'o.ed$ T&! &dent&f&er c,n be u!ed to /rou. re',ted.ro/r,m! ,nd de-e'o.ment ob>ect! to/eter ,nd m,* be u!ed to /&-e , d&!t&nct !&/n,turefor &nterf,ce contro' 'o/&c) re.ort&n/) ,nd d,t, f&'e n,me!$

Te t,b'e be'o" &/'&/t! te SAP !t,nd,rd 9odu'e ID ,nd Sub<9odu'e re',t&on!&.!$

 A..'&c,t&on

unct&on

9odu'e ID Sub<9odu'eID

Sub<9odu'e

De!cr&.t&on

&n,nc&,' Account&n/ I

 AA A!!et Account&n/

 AP Account! P,*,b'e

 AR Account! rece&-,b'e

C Common ,cro!! I

ED EDI

C &n,nc&,' Contro''&n/

9 und! m,n,/ement

GL Gener,' Led/er

LC Con!o'&d,t&on

SL S.ec&,' Pur.o!e Led/er  

Contro''&n/ CO

IO Intern,' Order!CA Co!t Centre Account&n/

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e of

Page 9: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 9/86

CODING GUIDELINES AND STANDARDS 

PC Product Co!t&n/

PA Prof&t,b&'&t* An,'*!&!

Product&on P',nn&n/ PP

PD P',nt D,t, Co''ect&on

 AO A!!emb'* Order!

PC P',nn&n/ ; Contro' < Re.$ 9,n

PO Product&on Order!

9R 9,ter&,' Reu&rement! P',nn&n/

CP C,.,c&t* P',nn&n/

9P 9,!ter P',nn&n/

SP S,'e! ; O.er,t&on! P',nn&n/

4u,'&t* 9,n,/ement 49

4P 4u,'&t* P',nn&n/

4I 4u,'&t* In!.ect&on

4C 4u,'&t* Contro'

CA 4u,'&t* Cert&f&c,te!

4N 4u,'&t* Not&f&c,t&on!

9,ter&,'! 9,n,/ement 99

=D =,!&c d,t,

C9 Common ,cro!! 99

ED EDI

I9 In-entor* 9,n,/ement

PI Purc,!&n/ Info !*!tem

I In-o&ce er&f&c,t&on

PR Purc,!&n/

%9 %,reou!e 9,n,/ementS*!tem

C= Con!um.t&on<=,!ed P',nn&n/

S,'e! ; D&!tr&but&on SD

=D =,!&c d,t,

=I =&''&n/

CS S,'e! Su..ort

C Common ,cro!! SD

ED EDI

IS S,'e! Info !*!tem

S S&..&n/

SL S,'e!

SO S,'e! Order 9,n,/ement

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e B of

Page 10: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 10/86

CODING GUIDELINES AND STANDARDS 

TR Tr,n!.ort,t&on

Tre,!ur* TR

T9 Tre,!ur* 9,n,/ement

In-e!tment 9,n,/ement I9

A C,.&t,' In-e!tment

Pro>ect S*!tem PS

CP Common ,cro!! Pro>ect S*!tem

=,!&! =A

C= Common ,cro!! =ASIS

IC Interf,ce Contro'

um,n Re!ource! R

=D =,!&c D,t,

CC Common ,cro!! R

PA Per!onne' Adm&n&!tr,t&on

TI T&me 9,n,/ement

I% Incent&-e %,/e!

=N =enef&t!

P7 P,*ro''

 Cro!!<A..'&c,t&on CA FF Cro!!<A..'&c,t&on

S(e'eton Pro/r,m S# EL S(e'eton Pro/r,m u!ed &n te.ro>ect

Te!tTro"<,",* TE ST Te!tTro"<,",*

0.* (7(P Dictionary

Cre,t&on of cu!tom DDIC ob>ect! !ou'd be (e.t to , m&n&mum to ,-o&d unnece!!,r*m,&nten,nce effort! ,nd !ou'd c,ter to !.ec&f&c funct&on,' reu&rement!) "&c ,re not met&n te SAP<!u..'&ed A=AP D&ct&on,r*$

Te fo''o"&n/ ,re .o&nt! to be (e.t &n m&nd dur&n/ def&n&t&on of d,t, d&ct&on,r* ?DDIC@ob>ect!:

• ore&/n (e*! referenc&n/ SAP t,b'e .r&m,r* (e*! ,re &/'* recommended$

• T,b'e m,&nten,nce f,c&'&t* ?S961) S960@ !ou'd be &m.'emented b* ece.t&on for

cu!tom t,b'e! t,t reu&re re!tr&cted m,nu,' ,cce!!$

• Document,t&on ,t te d,t, e'ement 'e-e' !ou'd m,(e u!e of te 'on/ tet f,c&'&t* tom,(e on<'&ne e'. effect&-e$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 10 of

Page 11: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 11/86

CODING GUIDELINES AND STANDARDS 

• or m,!ter d,t, or tr,n!,ct&on,' t,b'e!) te u!er n,me! of te .er!on! "o cre,ted

,ndor c,n/ed d,t,) te d,te of cre,t&onc,n/e !ou'd ,'!o be !tored ,'on/ "&t tere,!on for c,n/e$

• Tecn&c,' !ett&n/! !ou'd be m,&nt,&ned on ,'' cu!tom t,b'e! cre,ted ?Con!u't te

=ASIS te,m for ,!!&!t,nce "&t te tecn&c,' !ett&n/!@$

0.*.1 &ransparent &a2les4 Pool &a2les4 Structures

0.*.1.1 &ransparent &a2les

 A Tr,n!.,rent t,b'e ,! , 1:1 re',t&on!&. ?f&e'd for f&e'd@ "&t , corre!.ond&n/ .*!&c,' t,b'eon te under'*&n/ d,t,b,!e$ Tr,n!.,rent t,b'e! ,re t*.&c,''* u!ed to !tore m,!ter ,ndtr,n!,ct&on d,t,$

Te f&r!t c,r,cter !ou'd be te !t,nd,rd HF for cu!tom ob>ect!$ Te 2nd

 ; 6rd

 c,r,cter!!ou'd cont,&n te 9odu'e ID) fo''o"ed b* te 2 c,r,cter !ub<modu'e &d$ Te rem,&n&n/c,r,cter! ,re o.en$

orm,t: A == CC DDDDD

  O.en?de!cr&.t&on@

Sub<modu'eID

9odu'eID

Con!t,ntHF

0.*.1.* Structures

 A !tructure &! def&ned '&(e , t,b'e) but &t doe! not !tore record! &n te d,t,b,!e J &t &!t*.&c,''* u!ed ,! , reference d,t, def&n&t&on to en!ure con!&!tenc* bet"een .ro/r,mme!$Structure! c,n be !,red b* mu't&.'e A=AP .ro/r,m!$

Te f&r!t c,r,cter need! to be , HF for cu!tom !tructure!$ Te 2nd  ,nd 6rd  c,r,cter!!ou'd cont,&n te 9odu'e ID) fo''o"ed b* te t"o c,r,cter !ub<modu'e &d$ Te rem,&n&n/c,r,cter! ,re o.en$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 11 of

Page 12: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 12/86

CODING GUIDELINES AND STANDARDS 

orm,t: A == CC DDDDD

  O.en?De!cr&.t&on@

Sub<modu'eID

9odu'eID

Con!t,nt

HF

0.*.1., &a2le Fields

%ere .o!!&b'e) u!e te !,me n,me ,! te d,t, e'ement ,!!oc&,ted "&t te f&e'd$ Ifmu't&.'e f&e'd! &n te t,b'e u!e te !,me d,t, e'ement) n,me te!e f&e'd! &n , me,n&n/fu'm,nner ?e$/$ cre,t&on d,te ?CREDAT@ ,nd .o!t&n/ d,te ?POSDAT@ f&e'd! bot u!e DATU9d,t, e'ement@$

U!e on'* A'.,<numer&c -,'ue! &n t,b'e f&e'd n,me!$

0.*.* "iews

 A -&e" c,n be u!ed to cre,te -&rtu,' t,b'e! t,t do not cont,&n ,n* d,t,) but .re!ent!!e'ected co'umn! of d,t, from one or more d,t,b,!e t,b'e!$ A -&e" &! t*.&c,''* u!ed to '&n(d,t,b,!e t,b'e! u!&n/ common f&e'd! to .ro-&de ,n comb&ned re.ort out.ut$

Te f&r!t c,r,cter of te -&e" mu!t be , HF$ Te oter c,r,cter! c,n be ,rb&tr,r&'*,!!&/ned$ or c',r&t* .ur.o!e!) te m,&n t,b'e n,me c,n be u!ed$ o"e-er) te f&r!t 8

c,r,cter! mu!t be un&ue ,cro!! ,'' -&e"! < te D,t, D&ct&on,r* "&'' -,'&d,te t&!$

orm,t: A ====== CCC

O.en) ,n* ,'.,numer&c

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 12 of

Page 13: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 13/86

CODING GUIDELINES AND STANDARDS 

O.en$ Sou'd&ncor.or,te tem,&n t,b'e n,me,nd be un&ue

 

Con!t,nt HF

&e"! !ou'd be &dent&f&ed ,! !uc b* ,..end&n/ H_ to te end of te n,me$

0.*., Domains

 A dom,&n &! , centr,' ob>ect for de!cr&b&n/ te ,ttr&bute! of , bu!&ne!! ob>ect$ A dom,&nde!cr&be! te -,'ue !et for , f&e'd$ T&! !et of -,'ue! &! def&ned b* !.ec&f*&n/ te form,t,ttr&bute!) !uc ,! etern,' form,t) 'en/t ,nd t*.e$

SAP doe! cre,te dom,&n! t,t be/&n "&t , HF) !o cu!tom dom,&n! !ou'd be/&n "&t tef&r!t t"o c,r,cter! HFF$ Te rem,&n&n/ c,r,cter! c,n be ,rb&tr,r&'* ,!!&/ned but !ou'd be, me,n&n/fu' n,me$

orm,t: AA ========

  O.en ?De!cr&.t&on@

Con!t,ntHFF

0.*.0 Data lements

 A d,t, e'ement &! , !em,nt&c dom,&n$ It .ro-&de! , .rec&!e de!cr&.t&on of te funct&on of ,dom,&n &n , !.ec&f&c bu!&ne!! contet for te f&e'd! t,t de.end on &t$ E,c ne" d,t,e'ement def&ned b* te de-e'o.er mu!t be '&n(ed to , ne" dom,&n$ E&!t&n/ SAP dom,&n!!ou'd not be u!ed to def&ne ne" d,t, e'ement!$

Te f&r!t t"o c,r,cter! mu!t be HFF ,nd te rem,&n&n/ c,r,cter! c,n be ,rb&tr,r&'*,!!&/ned$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 16 of

Page 14: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 14/86

CODING GUIDELINES AND STANDARDS 

orm,t: AA ========

O.en ?Recommended

to !t,rt "&t 9odu'eID "ene-er &t m,(e!!en!e to do !o@

Con!t,ntHFF

0.*.8 oc9 O2jects

Loc( ob>ect! contro' !&mu't,neou! ,cce!! to , .,rt&cu',r t,b'eentr* b* t"o u.d,te u!er! J&$e$ en!ure t"o u!er! ,re .re-ented from u.d,t&n/ te !,me d,t, ob>ect !&mu't,neou!'*$Loc(! ,re !et ,nd re'e,!ed b* c,''&n/ , funct&on modu'e$ %en , 'oc( ob>ect &! ,ct&-,ted)te !*!tem ,utom,t&c,''* /ener,te! te funct&on modu'e! to be &nc'uded &n ,n A=AP.ro/r,m$

Loc( ob>ect n,me! !ou'd !t,rt "&t te .ref& HE_$ Te rem,&n&n/ c,r,cter! ,re o.en tote de-e'o.er$ o"e-er) te t,b'e n,me !ou'd be u!ed &f &t &! 'e!! t,n !e-en c,r,cter!$

orm,t: AAA =======

O.en ?u!e t,b'e n,me &f K 8c,r,cter!@

Con!t,ntHE__

0.*.: Searc# Help

Se,rc e'. &! ,n ob>ect of te A=AP D&ct&on,r* "&t "&c &n.ut e'.! ?3 e'.!@ c,n bedef&ned$ E'ement,r* !e,rc e'.! ,nd co''ect&-e !e,rc e'.! ,re d&!t&n/u&!ed$E'ement,r* !e,rc e'.! &m.'ement , !e,rc .,t for determ&n&n/ te .o!!&b'e entr&e!$Co''ect&-e !e,rc e'.! con!&!t of !e-er,' e'ement,r* !e,rc e'.! ,nd terefore .ro-&de!e-er,' ,'tern,t&-e !e,rc .,t!$

Te 1!t c,r,cter mu!t be HF$ or c',r&t* .ur.o!e!) te m,&n t,b'e -&e" n,me !ou'd beu!ed &f .o!!&b'e$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 13 of

Page 15: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 15/86

CODING GUIDELINES AND STANDARDS 

orm,t: A =========

O.en ?Recommended to &ncor.or,te tem,&n t,b'e -&e" n,me &f .o!!&b'e@

Con!t,nt HF

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 15 of

Page 16: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 16/86

CODING GUIDELINES AND STANDARDS 

0., (7(P Program

0.,.1 Program %aming

0.,.1.1 Program %ames

 A! .er te ED Ener/* ?Net"or(@ /u&de'&ne!) te SAP n,m&n/ con-ent&on! !ou'd,'",*! be fo''o"ed "en cre,t&n/ be!.o(e ob>ect! ?See EDF Energy (Network) ABAPDevelopment Standards V1.1 S:SAP P!"#E$%& ' DelveryProd*tDelveryDevelopment + ,gratonDevelopment$odng -delnes@$ Refer to te on<'&nee'. for furter det,&'!$

Te fo''o"&n/ ,..ro,c &! to be u!ed:

• Programs, reports should be named using a reference to the functionalspecication/task number at the beginning and then a descriptive part.For example 'ZH!"#$%&P()%%$%*+-+', 'Z&!01#2$-%+%$3(4'.

• &odule pools should be named using the standard convention, plus areference to the functional specication/task number and then adescriptive part. For example '!P&ZF05"$P(-$-H6'.

•  +ransactions should be named in line 7ith the report/program. Forexample a transaction for the module pool above 7ould be 'ZF05"'.

•  +ables, structures etc should be named using descriptive text, ratherthan numbers. For example 'Z08-+!'.

• 8ie7s should be identied as such, b9 appending '$8' to the end of thename. For example 'ZP+(-$8'.

• %nhanced 0:ocs should be named using the standard name as the basis,7here applicable, b9 replacing the rst letter 7ith 'Z'. %ntirel9 bespoke0:ocs should be created using a reference to the module 0:. For example'ZF0P)&'.

• unct&on /rou.! !ou'd be n,med u!&n/ te modu'e ID$ or e,m.'e FRS01 or 

FRS_GENERAL$ unct&on modu'e! m,* fo''o" ,n* !u&t,b'e n,m&n/con-ent&on$

Inc'ude , Pro/r,m T*.e ID &n te comment bo ,t te to. of *our .ro/r,m$ Po!!&b'e -,'ue!

for Pro/r,m T*.e ID ,re '&!ted be'o"$

Pro/r,m T*.e ID De!cr&.t&on

C Con-er!&on

D D,t, D&ct&on,r* 9,&nten,nce

E En,ncement

I Inbound Interf,ce!

O Outbound Interf,ce!

# C'one

9 S*!tem 9,&nten,nce

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1 of

Page 17: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 17/86

CODING GUIDELINES AND STANDARDS 

N Inc'ude .ro/r,m

R Re.ort

S SAP !cr&.t

U U!er E&t,'&d,t&on Subrout&ne Poo'% D,t, %,reou!e

Tem.or,r*) Demo or Te!t .ro/r,m!

0.,.1.* Program "aria2les ;Fields<

U!e de!cr&.t&-e n,me! ,nd *.en,te &t "&t M_ under!core$ %ene-er .o!!&b'e) te LI#E.,r,meter !ou'd be u!ed to def&ne "or( f&e'd!$

Te .ro/r,m -,r&,b'e! !ou'd u!e te fo''o"&n/ .ref&e! ?See EDF Energy (Network) ABAPDevelopment Standards@:

• G'ob,' d,t, !ou'd be n,med !t,rt&n/ "&t HG_$

• Intern,' t,b'e! !ou'd be n,med !t,rt&n/ "&t HI_$

• T,b'e "or( ,re,! !ou'd t,(e te n,me of te &ntern,' t,b'e) !uff&ed "&t H_%A$

• Con!t,nt def&n&t&on! !ou'd be n,med !t,rt&n/ "&t HC_$

• Contet &n!t,nce! !ou'd be n,med !t,rt&n/ "&t HC_$

• Loc,' !ubrout&ne .,r,meter! ,nd d,t, !ou'd be n,med !t,rt&n/ "&t HL_$

 A t*.e ,nd 'en/t !ou'd ,'",*! be !.ec&f&ed for , d,t, ob>ect$ An e.'&c&t t*.e !ou'd,'",*! be ,!!&/ned to te form,' .,r,meter! of , !ubrout&ne to &m.ro-e .erform,nce$

%ere .o!!&b'e) u!e te P,r,meter ID ,!!oc&,ted "&t , d,t, ob>ect to en,b'e ,utom,t&c.o.u',t&on$ T&! "&'' ,'!o ,&d "&t te .,!!&n/ of d,t, bet"een .ro/r,m! ,nd tr,n!,ct&on!$

Te u!e of te 9OE<CORRESPONDING !t,tement) tou/ con-en&ent) !ou'd be u!ed"&t c,re$ In !ome c,!e! te u!e of e.'&c&t 9OE !t,tement! c,n ,&d c',r&t*$

0.,.* !eport "ariant

%en ,n A=AP re.ort &! cre,ted) A=AP m,* /ener,te !ome d,t,b,!e<!.ec&f&c !e'ect&on.,r,meter! on te !e'ect&on !creen$ Add&t&on,' !e'ect&on<!creen cr&ter&, c,n ,'!o be.ro/r,mmed &nto te re.ort$ In order to eecute , re.ort for , !.ec&f&c r,n/e of d,t, or!e'ect&on !et) te !e'ect&on r,n/e! mu!t be entered on te !creen$ o"e-er) &f tere &! ,reu&rement to run te !,me re.ort "&t te !,me !e'ect&on !et) e!.ec&,''* &n b,tc) ,-,r&,nt c,n be u!ed to !,-e t,t !e'ect&on !et$ If , -,r&,nt &! u!ed) tere &! no need to enterte !,me !e'ect&on !et ,/,&n e,c t&me te re.ort &! eecuted$

0.,., odule Pool %ames

0.,.,.1 (7(P module Pools

 An A=AP modu'e .oo' &! ,n A=AP .ro/r,m t,t cec(! ,nd .roce!!e! ",t , u!er enter!dur&n/ , tr,n!,ct&on$ It &! tu! .,rt of on<'&ne .ro/r,mm&n/$ An A=AP modu'e .oo' /rou.!

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 18 of

Page 18: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 18/86

CODING GUIDELINES AND STANDARDS 

to/eter te modu'e! t,t .roce!! common d,t,$ 9odu'e .oo' n,me! mu!t be/&n "&tHSAPF ?"ere c,n be HU for u.d,te modu'e!) H9 for !creen modu'e!) HD for d&,'o/modu'e!) ,nd H for !ubrout&ne modu'e!@$ Te net t"o c,r,cter! re.re!ent te 9odu'e ID,nd te f&n,' t"o .o!&t&on! cont,&n , numer&c -,'ue$ or H9 t*.e modu'e .oo'!) te ',!t fourc,r,cter! of te .ro/r,m n,me !ou'd be &dent&c,' to te .r&m,r* tr,n!,ct&on code cre,tedfor t,t modu'e .oo'$

orm,t: AAAAA == NN

  Numer&c ,'ue

9odu'eID

Con!t,ntHSAPF

0.,.,.* odule Pool Components

N,m&n/ con-ent&on! for 9odu'e Poo' com.onent! mu!t ,'!o ,dere to SAP !t,nd,rd!$ Seet,b'e be'o" for det,&'ed con-ent&on! u!&n/ te ,bo-e e,m.'e$ ?Note: F,nn &n con-ent&on!be'o" !ou'd m,tc F,nn &n m,&n 9odu'e Poo' n,me@$

< 9odu'e Poo' T*.e

HU for u.d,te modu'e!

H9 for !creen modu'e!HD for d&,'o/ modu'e!

H for !ubrout&ne modu'e!

, < Proce!! Grou.

HA A!!et 9,n,/ement

H= =,!&!

HC Pro>ect S*!tem

H &n,nc&,' ,ccount&n/

‘G Gener,' Led/er H um,n Re!ource! P',nn&n/

HI 9,&nten,nce

H# Co!t Account&n/

HL %,reou!e 9,n,/ement

H9 9,ter&,'! 9,n,/ement

HP Product&on P',nn&n/

HR P,*ro''

HS S,'e! ,nd D&!tr&but&on

HU Gener,' S*!temUt&'&t*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1 of

Page 19: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 19/86

CODING GUIDELINES AND STANDARDS 

nn < Numer&c bet"een 00 ,nd BB

 

9odu'e Poo' Com.onentT*.e

N,m&n/ con-ent&on

D,t, Def&n&t&on ?G'ob,'D,t, Inc'ude@ 9odu'e

=>ann&OP

Proce!! =efore Out.ut?P=O@ 9odu'e

=>annOyy

Proce!! After In.ut ?PAI@9odu'e

=>ann'yy

Perform! ?!ubrout&ne!@ =>annFyy

Proce!! On e'.<Reue!t?PO@ 9odu'e

=>annHyy

Proce!! On ,'ue<Reue!t ?PO@ 9odu'e =>ann"yy

O(code O-code?screen num2er@

9enu .,&nter  ?screen no@A?BBBB@

orm! for O#codefunct&on!

FormA?O9code@

 Autor&!,t&on Ob>ect! Consult 7asis group

9odu'e .oo'! !ou'd be n,med u!&n/ te !t,nd,rd con-ent&on det,&'ed ,bo-e) .'u! ,

de!cr&.t&-e .,rt$ or e,m.'e HSAP9FIN01_PROC_C4$

Remarks: It &! m,nd,tor* to u!e te HA=AP %or(benc to con!truct modu'e .oo'!$ TeSAP %or(benc &! de!&/ned to enforce !t,nd,rd n,m&n/ con-ent&on!$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1B of

Page 20: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 20/86

CODING GUIDELINES AND STANDARDS 

0.,.0 Dynpros ;Screen<

SAP !creen! ,re referred to ,! d*n.ro!$ St,nd,rd SAP com.onent!) !uc ,! tr,n!,ct&on!)menu! ,nd t,b'e!) cont,&n d*n.ro! ,nd te ,!!oc&,ted .roce!!&n/ 'o/&c$ A de-e'o.er m,*,'!o cre,te cu!tom&!ed d*n.ro!$

Te &dent&f&c,t&on of , !creen .,&nter d*n.ro con!&!t! of ,n A=AP .ro/r,m n,me ,nd , four d&/&t d*n.ro number$ Te number r,n/e re!er-ed for cu!tom&!ed d*n.ro! !ou'd bebet"een B000 < BBBB$ Te &n&t&,' !creen number for , /&-en tr,n!,ct&on !ou'd be B000 ,nd,dd&t&on,' !creen! number! &ncrement b* 10$

orm,t: AAAAAAAA ====

D*n.ro number fromB000 < BBBB

 A=AP9odu'e Poo'

Example 

9odu'e Poo': SAP9FI01

Screen : B000

0.,.8 G+' Status 5 G+' &itle

0.,.8.1 G+' Status

 A GUI !t,tu! &! te m,&n e'ement of te Gr,.&c,' U!er Interf,ce$ A GUI !t,tu! c,n con!&!tof te fo''o"&n/: menu b,r) !t,nd,rd too'b,r) ,..'&c,t&on too'b,r ,nd funct&on!$ A GUI !t,tu!&! re',ted to ,n A=AP .ro/r,m$

orm,t: AAAAAAAA

O.en

Example 

STANDARD

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 20 of

Page 21: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 21/86

CODING GUIDELINES AND STANDARDS 

0.,.8.* Function -ey

unct&on (e*! ,re .,rt of te GUI !t,tu! ,nd ,re def&ned &n te menu .,&nter ,'on/ "&t.u!button! ,nd menu &tem!$ SAP ,! cert,&n !t,nd,rd !ett&n/! for !ome funct&on (e*!)'&!ted be'o":

1 e'.

2 Coo!e

6 =,c( ?one !te.@

3 Po!!&b'e entr&e!

B Se'ect

10 +um. to menu b,r  

11 S,-eGener,te

12 C,nce'S&ft<1 Pr&nt

S&ft<2 De'ete

S&ft<5 O.en

SAP ,'!o u!e! te fo''o"&n/ funct&on (e*! for !cro''&n/:

S&ft<B &r!t P,/e

S&ft<10 Pre-&ou! P,/e

S&ft<11 Net P,/e

S&ft<12 L,!t P,/e

0.,.8., G+' &itle

Te t&t'e b,r c,n be u. to 20 c,r,cter!$

orm,t: AAAAAAAA

O.en

Example 

INITIAL

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 21 of

Page 22: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 22/86

CODING GUIDELINES AND STANDARDS 

0.,.: &ransaction Codes

Tr,n!,ct&on Code! ,re cre,ted e&ter trou/ A=AP De-e'o.ment %or(benc$ E-er*tr,n!,ct&on &n SAP cont,&n! , un&ue tr,n!,ct&on code$ Inform,t&on ,bout ,'' tr,n!,ct&on!,re !tored &n t"o !t,nd,rd SAP t,b'e!$ T,b'e TSTC cont,&n! te ,ttr&bute! of te

tr,n!,ct&on ,nd t,b'e TSTCT cont,&n! te !ort tet ,!!oc&,ted "&t te tr,n!,ct&on$ Teentr&e! &n t,b'e! TSTC ,nd TSTCT ,re cre,ted b* SAP "en , tr,n!,ct&on code &!!ucce!!fu''* !,-ed$

 A tr,n!,ct&on code c,n not be more t,n 20 c,r,cter!$ Te n,m&n/ con-ent&on for tr,n!,ct&on! cre,ted b* Remote De-e'o.ment de-e'o.er! reu&re! te f&r!t c,r,cter be ,HF$ Te 9odu'e ID &! .',ced &n te net t"o c,r,cter!$ Te rem,&n&n/ t"o c,r,cter! ,reo.en to te de-e'o.er$

orm,t: A == CC

O.en ?,n* ,'.,numer&c&dent&f&er@

 

9odu'e ID

Con!t,nt HF

Example 

FI01

Tr,n!,ct&on! !ou'd be n,med &n '&ne "&t te re.ort .ro/r,m$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 22 of

Page 23: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 23/86

CODING GUIDELINES AND STANDARDS 

0.0 Function O2jects

0.0.1 Function Groups

SAP funct&on modu'e! ,re .ro/r,m! "r&tten &n A=AP t,t c,n be c,''ed b* ,n* A=AP.ro/r,m or te funct&on modu'e! tem!e'-e!$ Te* ,re m,n,/ed centr,''* &n te funct&on'&br,r*) "&c .ro-&de! !e,rc) d&!.',*) m,&nten,nce ,nd .r&nt&n/ c,.,b&'&t&e! for ,'' !t,nd,rd,nd cu!tom funct&on modu'e!$

unct&on modu'e! ,re /rou.ed to/eter u!&n/ funct&on /rou.!$ SAP !u..'&ed funct&on/rou.! !ou'd ne-er be ,!!&/ned to ne" funct&on modu'e!$ De-e'o.ment te,m member!mu!t cre,te ne" funct&on /rou.! .r&or to de-e'o.&n/ ne" funct&on modu'e!$

unct&on /rou. n,me! mu!t !t,rt "&t , HF$ Te net t"o c,r,cter! "&'' !tore te 9odu'eID$ Te rem,&n&n/ c,r,cter! ,re o.en$

orm,t: A == CCC

O.en?De!cr&.t&on@

9odu'e ID

Con!t,ntHF

Example 

FI001

0.0.* Function odules

Te funct&on modu'e n,me c,n be u. to 60 c,r,cter! 'on/ ,nd mu!t be/&n "&t HF_$ T&!"&'' d&fferent&,te cu!tom funct&on modu'e! from !t,nd,rd SAP funct&on modu'e!$ Terem,&n&n/ 2 c,r,cter! mu!t ref'ect te n,ture of te funct&on$ Under!core! ,re u!ed to

!e.,r,te "ord!$

orm,t: AA ============================

O.en ?De!cr&.t&on@

Con!t,ntHF_

Example 

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 26 of

Page 24: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 24/86

CODING GUIDELINES AND STANDARDS 

F_CEC#_DATE

0.8 Ot#er O2jects

0.8.1 Development Classes

De-e'o.ment c',!!e! /rou. to/eter de-e'o.ment ob>ect! ?e$/$ .ro/r,m!) t,b'e!) funct&onmodu'e!@ "&c c,n be corrected ,nd m&/r,ted to/eter ,cro!! &n!t,nce!$ A de-e'o.mentc',!! c,n) for e,m.'e) con!&!t of , tr,n!,ct&on or , /rou. of re',ted tr,n!,ct&on! ,'on/ "&t.ro/r,m!) DDIC ob>ect!) menu .,&nter!) !creen .,&nter!) 'oc( ob>ect!) me!!,/e c',!!e!)m,tc code!) etc$

If , de-e'o.er be'&e-e! t,t , un&t of "or( &! !&/n&f&c,nt ,nd de!er-e! &t! o"n de-e'o.mentc',!!) ten ,n ,dd&t&on,' de-e'o.ment c',!! m,* be reu&red$ Te de-e'o.er !ou'd

reue!t ,n ,dd&t&on,' de-e'o.ment c',!! from te SAP Cu!tom De-e'o.ment Te,m Le,d$

%o o2jects s#ould 2e defined under t#e &P development class prototyping s#ouldonly occur in t#e Sand2o= environment.

De-e'o.ment C',!!e! !ou'd ,dere to te fo''o"&n/ n,m&n/ con-ent&on:

%otesE If .o!!&b'e) te de-e'o.er! &n&t&,'! !ou'd be .ut &nto te ob>ect n,me &n!te,d ofo.en -,'ue!$ or e,m.'e) FTED+001 !ou'd be u!ed for , te!t re.ort .ro/r,m

de-e'o.ed b* +on reem,n) &n!te,d of u!&n/ FIAP0001$

For ot#er o2jectsE Sele*t te development *lass *orrespondng to te /sness pro*essteam re0estng te development.

• FR J R

• FI J &n,nce

• F99 J Procurement

• FCON J Con-er!&on

0.8.* (rea enus

 An ,re, menu &! te f&r!t menu t,t ,..e,r! "en enter&n/ ,n H,..'&c,t&on ,re,$ or 

e,m.'e) !e'ect&n/ Too'! ⇒ A=AP %or(benc "&'' t,(e *ou to te A=AP %or(benc ,re,

menu ,nd te A=AP %or(benc ,..'&c,t&on ,re,$

Te ,re, menu fo''o"! te !,me n,m&n/ con-ent&on! ,! tr,n!,ct&on code!$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 23 of

Page 25: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 25/86

CODING GUIDELINES AND STANDARDS 

orm,t: A == CCC

O.en ?,n*,'.,numer&c&dent&f&er@

9odu'eID

Con!t,ntHF

Example 

FI001

0.8., essages

9e!!,/e! ,re u!ed &n A=AP .ro/r,m! to !end &nform,t&on to te u!er$ Tere ,re !&

d&fferent t*.e! of me!!,/e!: &nform,t&on) ",rn&n/) error) ,bend) e&t ,nd !ucce!!$

 A me!!,/e con!&!t! of , 6 c,r,cter me!!,/e c',!! ,nd , 6 d&/&t number$ Te f&r!tc,r,cter of te me!!,/e c',!! !ou'd be , HF ,nd te net t"o c,r,cter "&'' cont,&n te9odu'e ID$ Te me!!,/e number &! o.en to ,n* number bet"een 000 ,nd BBB$

 Accord&n/ to te n,m&n/ con-ent&on!) on'* one me!!,/e c',!! c,n e&!t for e,c 9odu'eID$ %en , de-e'o.er need! to cre,te ne" me!!,/e number!) te* need to reue!t ,number r,n/e "&t&n , !.ec&f&c c',!! from te de-e'o.ment te,m 'e,d$

orm,t:

 A == CCC

9e!!,/e Number bet"een 000 < BBB

9odu'e ID

Con!t,ntHF

Example 

9e!!,/e Id HFI T*.e HE Number H001$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 25 of

Page 26: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 26/86

CODING GUIDELINES AND STANDARDS 

0.8.0 ogical Data2ases

 A 'o/&c,' d,t,b,!e cre,te! , &er,rc&c,' -&e" of .*!&c,' re',t&on,' t,b'e!$ S.ec&f&c,''*) tede-e'o.er ,! te ,b&'&t* to '&n( d,t,b,!e t,b'e! "&c !&m.'&f&e! re.ort .ro/r,mm&n/trou/ !t,nd,rd&!ed re,d ,cce!!e!) ,utor&!,t&on cec(! ,nd !e'ect&on!$

Due to te !tr,te/&c &m.ort,nce of 'o/&c,' d,t,b,!e! ,nd te .otent&,' &m.,ct on !*!tem.erform,nce) c,refu' con!&der,t&on !ou'd be m,de before cre,t&n/ ,n* ne" 'o/&c,'d,t,b,!e!$ Conse3uently4 only t#e D7( will 2e a2le to create logical data2ases. 

Lo/&c,' d,t,b,!e n,me! con!&!t of four c,r,cter!$ Te f&r!t c,r,cter mu!t be/&n "&t ,HF$ Te !econd c,r,cter &! o.en to ,n* ,'.,numer&c c,r,cter$ Te net t"o c,r,cter!mu!t re.re!ent te 9odu'e ID$

orm,t: A = CC9odu'e ID

 

O.en

Con!t,nt HF

Example 

FAI

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2 of

Page 27: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 27/86

CODING GUIDELINES AND STANDARDS 

0.: 7ac9ground o2s

 A'' b,c(/round >ob!) A=AP .ro/r,m! !et<u. to run &n te b,c(/round) ,re c'&ent<de.endent

ob>ect!$ Te* ,re !ubm&tted "en te !*!tem &! ,ct&-e$ =,c(/round >ob! ,-e ,n ,!!&/ned!t,rt&n/ .o&nt ,nd -,r&ou! !e'ect&on .,r,meter!$

Te m,&mum 'en/t of , b,c(/round >ob n,me &! 62 c,r,cter!$ Te f&r!t n&ne c,r,cter!"&'' cont,&n te .ro/r,m n,me fo''o"ed b* ,n under!core$ Te tent .o!&t&on d&!.',*! , HPfor Product&on ?L&-e run "&t d,t, !,-ed to SAP d,t,b,!e@ or , HT ?d,t, .re!ented to!creen or !.oo') but not !,-ed to SAP d,t,b,!e@ for Te!t +ob$ Te e'e-ent .o!&t&on "&''!o" te freuenc* ?!ee (e* be'o"@$ Te net .o!&t&on "&'' !o" &f t&! b,c(/round >ob &!HCr&t&c,' or HNon<Cr&t&c,'$ Te fo''o"&n/ e&/t .o!&t&on! o'd te reue!ter! SAP 'o/on$ T&!&! fo''o"ed b* ,n under!core$ Te ',!t tree .o!&t&on! ,re for , !euent&,''* ,!!&/nednumber$ De-e'o.er! "&'' on'* u!e 25 out of 62 ,-,&',b'e .o!&t&on!$

reuenc*: D < D,&'*

% < %ee('*

9 < 9ont'*

4 < 4u,rter'*

R < On Reue!t

orm,t: AAAAAA AAA

= C DD EEEEEEEEE

Seuent&,''*,!!&/nednumber 

Reue!ter!SAP Lo/on; H_

Cr&t&c,'Non<Cr&t&c,' ;H_

reuenc*',/

L&-eTe!tRun ',/

Pro/r,mN,me ; H_H

Example 

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 28 of

Page 28: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 28/86

CODING GUIDELINES AND STANDARDS 

FIARI001_P9C_DS_001

0. 7atc# 'nput Sessions

=,tc &n.ut !e!!&on! ,re , co''ect&on of b,tc &n.ut d,t, u!ed ,! &n.ut to one or moreu.d,te tr,n!,ct&on!$ Etern,' d,t, c,n be tr,n!ferred &nto te SAP !*!tem trou/ , b,tc&n.ut !e!!&on$ Te* ,re !tored on te b,tc &n.ut ueue unt&' !ubm&!!&on to te tr,n!,ct&on.roce!!&n/$ In order to /u,r,ntee d,t, con!&!tenc*) ,'' d,t, &! !ub>ect to te !,me-,'&d,t&on! .erformed &n te on<'&ne tr,n!,ct&on$

=,tc &n.ut !e!!&on n,me! c,n be u. to 16 c,r,cter! 'on/$ Te f&r!t B c,r,cter! "&'' bete n,me of te .r&m,r* .ro/r,m t,t cre,ted te !e!!&on$ Te rem,&n&n/ 3 c,r,cter!!ou'd m,tc te ',!t four d&/&t! of te d,t,!et$

orm,t: AAAAAAAAA = CC

Seuent&,'number m,tc&n/ ',!t 2d&/&t! of  d,t,!et !er&,'number ?for  &nterf,ce!@$

Kor O.en ?for non<&nterf,ce!

Under!core M_Kor O.en ?for non<&nterf,ce!@

N,me of m,&n.ro/r,m t,tcre,ted te!e!!&on

Example 

FIARI001_01

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2 of

Page 29: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 29/86

CODING GUIDELINES AND STANDARDS 

0. Datasets

It &! &m.ort,nt t,t SAP<!.ec&f&c d,t,!et n,m&n/ con-ent&on! be ,dered to !&nce etern,'

!*!tem! "&'' be &nterf,c&n/ "&t SAP$ P'e,!e note t,t te fo''o"&n/ n,m&n/ con-ent&on "&''be conf&rmed ,nd ,mended ,ccord&n/'* ,fter te det,&'! of &nterf,ce contro' mec,n&!m,-e been conf&rmed$

Te f&'e !tructure for ,'' !,. re',ted d,t,!et! "&'' be:

0..1 File %aming

E&!t&n/ !ource !*!tem! f&'e! !ou'd not be !ub>ect to n,me c,n/e! &f t&! reu&re!de-e'o.ment effort$ %ere &nterf,ce f&'e! ,re ne" reu&rement! te fo''o"&n/ f&'e n,m&n/!t,nd,rd !ou'd be ,dered to:

&'e T*.e: d < for , d,t, f&'e

c < for , contro' f&'e&'e D&rect&on: & < &n.ut f&'e

o < out.ut f&'e

orm,t: A = C DDDDD

Ser&,' Number ?!euent&,'@

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2B of

Q , r c & - e Q c o n t r o ' Q d , t , Q ' o /

Q & n b o u n d

Q , r c & - e Q c o n t r o ' Q d , t , ' o /

Q o u t b o u n d

Q & n t e r f , c e

Q K S I D P

Q ! , .

Q u ! r 

Page 30: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 30/86

CODING GUIDELINES AND STANDARDS 

&'e Ident&f&er ?,) b) c) etc$@

&'e D&rect&on

&'eT*.e

Example

d&,00001 < &n.ut d,t, f&'e n,me

c&,00001 < corre!.ond&n/ contro' f&'e n,me

0.I ayout Sets

 A ',*out !et &n SAP!cr&.t &! u!ed for .,/e ',*out$ Te ',*out !et cont,&n! -,r&ou! e'ement!u!ed for ',*out contro'$ A ',*out !et def&n&t&on cont,&n! te fo''o"&n/ e'ement!: e,der D,t,) P,r,/r,.!) C,r,cter Str&n/!) %&ndo"!) P,/e! ,nd P,/e %&ndo"!$

Te ',*out !et n,me c,n be , m,&mum of !&teen c,r,cter!$ It !ou'd !t,rt "&t te .ref&HFF_$ T&! &! fo''o"ed b* te 9odu'e ID ,nd !ub!*!tem$ Te rem,&n&n/ ten c,r,cter! ,reo.en to ,n* ,'.,numer&c comb&n,t&on$

orm,t: AAA == CC DDDDDDDDDD

O.en

Sub<modu'e ID

9odu'eID

Con!t,nt HFF_

Example 

FF_IARLA7OUTSET1

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 60 of

Page 31: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 31/86

CODING GUIDELINES AND STANDARDS 

0.1) &ransport !e3uest

 A tr,n!.ort reue!t &! /ener,ted "en conf&/ur,t&on cu!tom ob>ect! ,re cre,ted or mod&f&ed$ Te tr,n!.ort reue!t no$ &! /ener,ted ,utom,t&c,''* b* te !*!tem$ o"e-er) ,!ort de!cr&.t&on of , m,&mum 'en/t of 0 &! reu&red for e,c tr,n!.ort reue!t dur&n/ &t!cre,t&on$ Te n,m&n/ !t,nd,rd for te de!cr&.t&on &!:

Position Content

1 J 6 Te,m ?RTC) CLC) IN) TEC@

3 M: ?co'on@

5 < 15 Sub<Te,m or ,..'&c,t&on ,re,

1 M: ?co'on@

18 < 0 me,n&n/fu''* !ort tet

Example 

RTC: 9,ter&,' m,!ter: 9,ter&,' /rou.!

TEC: Con-er!&on: AP Document U.'o,d

0.11 egacy System igration Jor92enc# ;SJ< "1.

Te LS9% &! ,n R6<b,!ed too' t,t !u..ort! u!er to tr,n!fer d,t, from non<SAP !*!tem!?Le/,c* !*!tem!@ to SAP R6 !*!tem$ In t&! .ro>ect) 1$ of LS9% "&'' be u!ed ,!,..ro.r&,te for d,t, con-er!&on reu&rement!$ Te fo''o"&n/ !ect&on! de!cr&be te !tructure,nd n,m&n/ con-ent&on to be u!ed "&t&n LS9% to c',!!&f* ,'' te con-er!&on ob>ect! &n t&!.ro>ect$

0.11.1 Project

Pro>ect ID &! te &/e!t 'e-e' of te con-er!&on ob>ect re.o!&tor*$ In t&! .ro>ect) "e "&''

c',!!&f* Pro>ect ,ccord&n/ to te funct&on,' te,m !tructure) "&c &! te !,me ,! teDe-e'o.ment C',!!:

KDef&ne de-e'o.ment c',!!

or ,'' oter ob>ect! t,t "&'' not be tr,n!ferred to oter &n!t,nce! ?&nc'ud&n/ ,'' te .r&-,te,nd te!t&n/ ob>ect!@) te* !ou'd be .',ced under Pro>ect FTES

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 61 of

Page 32: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 32/86

CODING GUIDELINES AND STANDARDS 

0.11.* Su2project

Sub.ro>ect ID &! te !econd 'e-e' of te con-er!&on ob>ect re.o!&tor*$ In t&! .ro>ect) "e "&''u!e te Reue!t Ob>ect ID for e,c con-er!&on ob>ect ,! te Sub.ro>ect$

Example

RTC_C0001 for 9,ter&,' 9,!ter con-er!&on

%oteE or ,'' .r&-,te ,nd te!t&n/ ob>ect! cre,ted under Pro>ect FTES) .'e,!e cre,te ,Sub.ro>ect to &nc'ude *our de-e'o.er! &n&t&,'! &n!te,d of u!&n/ ,rb&tr,r* ,'.,numer&cc,r,cter!$

0.11., O2ject

Ob>ect ID &! u!ed to &dent&f* te con-er!&on ob>ect! cre,ted under e,c Sub.ro>ect$ It &! te'o"e!t 'e-e' of te con-er!&on ob>ect re.o!&tor*$ Te con-er!&on ob>ect n,me c,n be u!ed,! .,rt of te Ob>ect ID$ If more t,n one ob>ect e&!t under te !,me Sub.ro>ect) number!c,n be ,!!&/ned ,t te b,c( of te Ob>ect ID to furter d&fferent&,te te con-er!&on ob>ect!$

Example

9AT9AS_001 for 9,ter&,' 9,!ter

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 62 of

Page 33: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 33/86

CODING GUIDELINES AND STANDARDS 

0.1* Summary

Te fo''o"&n/ t,b'e !umm,r&!e! te n,m&n/ con-ent&on! de!cr&bed &n t&! document$ E,c

SAP Ob>ect T*.e &! de!cr&bed &n furter det,&' &n fo''o"&n/ !ect&on!$ Note t,t c,.&t,' 'etter!re.re!ent '&ter,'! ,nd !ou'd not be c,n/ed$ Lo"erc,!e 'etter! re.re!ent -,r&,b'e f&e'd!)"&c m,* t,(e on !ome r,n/e of -,'ue! de!cr&bed &n te ,..ro.r&,te !ect&on$

SAP Ob>ect T*.e N,m&n/ Con-ent&on

Tr,n!.,rent T,b'e! (77CCADDDDDA DDDDD

(E Con!t,nt HF

7E 9odu'e ID

CE unct&on,' Sub!*!tem

DE De!cr&.t&on

Structure (77CCADDDDDADDDDD

(E Con!t,nt HF

7E 9odu'e ID 

CE unct&on,' Sub!*!tem

DE De!cr&.t&on

&e"! (777777ACCCACCC

(E Con!t,nt HF

7E O.en) !ou'd be un&ue ?m,&n t,b'e n,me c,nbe u!ed@

CE De!cr&.t&on

Dom,&n! ((77777777

(E Con!t,nt HFF

7E O.en

D,t, E'ement! ((77777777

(E Con!t,nt HFF

7E O.en ?Recommended to !t,rt "&t 9odu'e ID"ene-er &t m,(e! !en!e to do !o@

Loc( Ob>ect! (((7777777

(E Con!t,nt HEF_

7E O.en ?u!e t,b'e n,me &f K 8 c,r,cter!@

Se,rc e'.! (777777777

(E Con!t,nt HF7E O.en ?Recommended to u!e te m,&n t,b'e

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 66 of

Page 34: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 34/86

CODING GUIDELINES AND STANDARDS 

-&e" "ene-er &t m,(e! !en!e to do !o@

Pro/r,m N,m&n/ (A77CCADDDDADDDD

(E Con!t,nt HF

7E 9odu'e IDCE Sub 9odu'e ID

DE De!cr&.t&on

Pro/r,m ,r&,b'e! ?&e'd!@: KGAL: G'ob,' d,t,

K'AL: Intern,' t,b'e!

KAJ(L: T,b'e "or( ,re,!

KCAL: Con!t,nt def&n&t&on!

KCBAL: Contet &n!t,nce!

KAL: Loc,' !ubrout&ne .,r,meter! ,nd d,t,

 A=AP modu'e Poo'! (((((77%%

(E Con!t,nt HSAPF

7E 9odu'e ID

%E Numer&c ,'ue

PAI =>ann'yy4 * J O.en

P=O =>annOyy4 * J O.en

Subrout&ne =>annFyy4 * J O.enD*n.ro! ?Screen@ (((((((( 7777

 (E A=AP 9odu'e Poo'

 7E D*n.ro number from B000 J BBB0

GUI St,tu! ((((((((

(E O.en

GUI T&t'e ((((((((

(E o.en

Tr,n!,ct&on Code (77CC(E Con!t,nt HF

7E 9odu'e ID

CE O.en ?,n* ,'.,numer&c &dent&f&er@

unct&on Grou. (77CCC

(E Con!t,nt HF

7E 9odu'e ID

CE O.en

unct&on 9odu'e (A777A7777777777

(E Con!t,nt HF_

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 63 of

Page 35: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 35/86

CODING GUIDELINES AND STANDARDS 

7E De!cr&.t&on

De-e'o.ment C',!! For local private o2jects 6 never transported.

&P

 Are, 9enu! (77CCC(E Con!t,nt HF

7E 9odu'e ID

CE O.en ?,n* ,'.,numer&c &dent&f&er@

9e!!,/e (77CCC

(E Con!t,nt HF

7E 9odu'e ID

CE 9e!!,/e Number bet"een 000 < BBB

Lo/&c,' D,t,b,!e! (7CC(E Con!t,nt HF

7E O.en

CE 9odu'e ID

=,c(/round +ob! (((((((((7CDDFF

(E Pro/r,m N,me ; H_H

7E Product&onTe!t ',/ 

CE reuenc* ',/

DE Cr&t&c,'Non<Cr&t&c,' ; H_E Reue!ter! SAP Lo/on ; H_

FE Seuent&,''* A!!&/ned Number

=,tc In.ut Se!!&on! ?=DCSe!!&on!@

(((((((((7CC

(E N,me of m,&n .ro/r,m t,t cre,ted te !e!!&on

7E Under!core M_ Kor O.en ?for non<&nterf,ce!@

CE Seuent&,' number m,tc&n/ ',!t 2 d&/&t! ofd,t,!et !er&,' number ?for &nterf,ce!@$Kor O.en?for non<&nterf,ce!@

D,te!et! (7CDDDD

(E &'e T*.e 

7E &'e D&rect&on 

CE &'e Ident&f&er ?,) b) c) etc$@

DE Ser&,' Number ?!euent&,'@

Scr&.t! ((((((((.777

(E A=AP Pro/r,m N,me ?&n 'o"erc,!e@

7E Mb,t

L,*out !et! (((77CCDDDDDDDDD

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 65 of

Page 36: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 36/86

CODING GUIDELINES AND STANDARDS 

(E Con!t,nt HFF_

7E 9odu'e ID

CE Sub<modu'e ID

DE O.en

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6 of

Page 37: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 37/86

CODING GUIDELINES AND STANDARDS 

8.)P!OG!('%G S&(%D(!DS

T&! !ect&on cont,&n! , '&!t of A=AP cod&n/ !t,nd,rd!) ,! "e'' ,! !ome eff&c&enc* !t,nd,rd!$Te .ur.o!e of te!e !t,nd,rd! &! to:

• Encour,/e con!&!tent .r,ct&ce! ,mon/ .ro/r,mmer!: Pro/r,m! coded b* d&fferent

.eo.'e !ou'd fo''o" !t,nd,rd cod&n/ con-ent&on!$

• Pro-&de &ntern,' document,t&on: Pro/r,m! !ou'd be documented to te etent t,t

,noter .ro/r,mmer cou'd fo''o" te 'o/&c of te code$

• Im.ro-e re,d,b&'&t*: Pro/r,m! !ou'd fo''o" , form,t t,t m,(e! te code e,!* to re,d

8.1 General !ules

 A=AP .ro/r,m! t,t u.d,te m,!ter ,nd tr,n!,ct&on,' d,t, 9UST AL%A7S u!e SAPtr,n!,ct&on code! ?"ere tr,n!,ct&on code! ,re ,-,&',b'e@ b* ut&'&&n/ =DC or Hc,''tr,n!,ct&on ut&'&t&e!$ Te on'* ece.t&on to t&! "ou'd be te u!e of , =API or d&rect &n.ut.ro/r,m .ro-&ded b* SAP$ Te!e metod! en!ure t,t 'o/&c,' un&t! of "or() ro''b,c()'oc(&n/ o.er,t&on! ,nd ed&t! ,re .erformed$ SAP<!u..'&ed t,b'e! 9UST NEER beu.d,ted d&rect'* b* cu!tom .ro/r,m! J ,'",*! u!e !t,nd,rd unct&on 9odu'e!=API!$

 A=AP .ro/r,m! 9UST NEER be u!ed to u.d,te conf&/ur,t&on t,b'e!$

SAP<de'&-ered A=AP .ro/r,m!) D*n.ro!) SAP tr,n!,ct&on! ,nd =,tc .ro/r,m! !ou'd notbe c,n/ed un'e!! &dent&f&ed ,! , !.ec&f&c Pro>ect En,ncement$ SAP ,..ro-,' "&'' ,'!o/ener,''* be reu&red$ If &t become! nece!!,r* to mod&f* one of te!e ob>ect! &dent&f* ,n

,..ro.r&,te U!er E&t) ten) &f not ,-,&',b'e) te ob>ect !ou'd be co.&ed to , ne" n,meu!&n/ SAP n,m&n/ !t,nd,rd!) ,nd mod&f&c,t&on! !ou'd be m,de to te co.&ed ob>ect$

=efore "r&t&n/ ,n* code) m,(e !ure t,t no e&!t&n/ .ro/r,m! or funct&on modu'e!) e&tercu!tom or SAP<!u..'&ed) !,t&!f* te cod&n/ reu&rement!$

If cu!tom cod&n/ &! nece!!,r*) ,ttem.t to "r&te te modu'e !o t,t &t &! re<u!,b'e ,nd c,n be!tored &n , centr,' '&br,r*$ unct&on modu'e! ,re ,n e,m.'e of t&! ,..ro,c$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 68 of

Page 38: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 38/86

CODING GUIDELINES AND STANDARDS 

8.* Coding Style

Te A=AP ed&tor ,! , PP ?Prett* Pr&nter@ comm,nd to &ndent !.ec&f&c '&ne! of code b* 2

.o!&t&on! ,nd ,dd !ubrout&ne comment!$ 9enu .,t: .ro/r,m.rett* .r&nter &n A=AP Ed&tor$

%en e-ent! ?e$/$ END<O<SELECTION) TOP<O<PAGE) etc$@ ,re u!ed &n te code) te*!ou'd ,..e,r &n te order &n "&c te* ,re /ener,''* eecuted$

S(&..ed '&ne! ,nd &ndent&on !ou'd be u!ed to .romote c',r&t* bet"een !ect&on! of code ,!"e'' ,! bet"een f&'e def&n&t&on! ,nd dec',r,t&on!$

or e,!e of re,d&n/ code) conc,ten,te re.et&t&-e comm,nd! "&t , co'on ,! .ro-&ded b*SAP$ A'' T7PE!) TO!) ALUE!) DEAULT!) t,b'e n,me!) ,nd comment! !ou'd be ,'&/ned,mon/ tem!e'-e! trou/out te code) or e,m.'e$

WRITE: LFA1_LIFNR,

  LFA1_NAME1,  LFA1_ORTO1.

#ee. .ro/r,m! to , re,!on,b'e 'en/t$ Pro/r,m! !ou'd be 'on/ enou/ !o t,t tere &!not ,n ece!!&-e ,mount of d,t, be&n/ .,!!ed bet"een t"o re',ted .ro/r,m!) but !ou'dbe !ort enou/ !o t,t te !,me .ro/r,m doe! not .erform m,n* d&!crete funct&on!$

Con!&der te u!e of INCLUDE .ro/r,m! for D,t, Dec',r,t&on!) P=O D*n.ro modu'e!) PAID*n.ro modu'e!) Subrout&ne!) ,nd Ind&-&du,' E-ent Proce!!&n/$

U!e !ubrout&ne! ,nd OR9 .,r,/r,.! "ene-er .o!!&b'e to &m.ro-e re,d,b&'&t* ,nd 'o/&cf'o"$ If , b'oc( of code &! eecuted more t,n once) &t !ou'd be .',ced &n , !ubrout&ne ,tte bottom of te code$

OR9 .,r,/r,.! !ou'd be .',ced ,fter ,'' non<!ubrout&ne code) ,fter te END<O<SELECTION e-ent$ OR9 .,r,/r,.! !ou'd /ener,''* be .o!&t&oned &n te order &n "&cte* ,re c,''ed "&t&n te .ro/r,m$

E-er* 'o/&c,' d&-&!&on "&t&n te .ro/r,m !ou'd ,-e de!cr&.t&-e comment! &mmed&,te'*.r&or to te ,ctu,' code$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6 of

Page 39: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 39/86

CODING GUIDELINES AND STANDARDS 

E,c .ro/r,m !ou'd ,-e , comment bo before te MREPORT !t,tement ,! !o"nbe'o":

*&---------------------------------------------------------------------**& Program Name : Zxxxxxx *

*& Modue Name : F!"a"#!a A##ou"$!"g **& %u-Modue : A##ou"$' Pa(ae **& Au$)or : xxxxxx xxx , xxxxx xxxxx **& rea$e +a$e : xxxxxxxx **& Log!#a + : No"e **& Program T(e : Reor$' **& %AP Reea'e : /.0 **& Tra"'or$ No. **& %IRR No. **& +e'#r!$!o" : xxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxx xxxxx **& xxxx xx xxxxxxx xxxx xx xx xx xxxxxxxxx **&---------------------------------------------------------------------* 

E-er* mod&f&c,t&on) no m,tter o" &n!&/n&f&c,nt) !ou'd be documented "&t ,n ,dd&t&on,'comment bo ,dded to te .ro/r,m$ T&! .ro-&de! ,n e,!* ,ud&t tr,&' of te .ro/r,m!&!tor*) ,nd ,'!o ,''o"! for com.,r&!on of -er!&on! &n d&fferent en-&ronment! M,t , /',ncer,ter t,n -&, remote com.,r&!on!$

Te mod&f&c,t&on comment bo !ou'd 'oo( ,! fo''o"!:

*&---------------------------------------------------------------------**& . . . . . . **& ********** OMMENT O AFTER 2REPORT3 %TATEMENT ********** **& . . . . . . **&---------------------------------------------------------------------**& RE4I%ION LO5 **& *

*& LO56 +ATE A7T8OR +E%RIPTION **& ---- ---- ------ ----------- **& 0000 90;< xxxxxx xxx I"!$!a Imeme"$a$!o" **& **& 0001 91/;< xxxxx xxxxx xxxxxxx xxxxxxxx xx xxxx **& xxxxxxxxx xxx xxx xxxxxxxx **& **& 000= 9=0;< xxxxxx xxx xxxxxx xxxxxx xxxxx: xxxxxxxx **& xxxxxxxxx xxxxxx xxxx xxxx, **& xxxxxx xxxx xxxx xxxx, xxx. **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REPORT ZNEWP5M.

Comment ,'' !ubrout&ne! "&t te&r .ur.o!e$ Comment! !ou'd e.',&n te bu!&ne!!re,!on! for te code &n , .,rt&cu',r !ect&on ,nd ",t te code &n t,t !ect&on &!,ccom.'&!&n/$ Comment! !ou'd not e.',&n &nd&-&du,' A=AP comm,nd!$ A''o" te A=APed&tor to /ener,te te comment bo) b* cod&n/ te PEROR9 Kform !t,tement ,nddoub'e<c'&c(&n/ on te Kform$ =e !ure to document te &n.ut ,nd out.ut .,r,meter! forte !.ec&f&c form &n te comment bo$

De,d Code !ou'd be remo-ed from te .ro/r,m) &$e$ te f&e'd! "&c ,re ne-er referenced,nd code "&c c,n ne-er 'o/&c,''* eecuted$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6B of

Page 40: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 40/86

CODING GUIDELINES AND STANDARDS 

8., !eport Standard

Te re.ort! !ou'd be coded "&t NO STANDARD PAGE<EADING !.ec&f&ed &n teREPORT !t,tement$ Ten) &n te TOP<O<PAGE e-ent) , funct&on modu'e !ou'd beCALLed for "r&t&n/ .ro>ect !t,nd,rd e,der$

S.ec&f* b',n( '&ne! ?for out.ut@ b* u!&n/ MS#IP TO LINE Knn or S#IP KnM) r,ter t,nmu't&.'e M%RITE '&ne!$

or .ro/r,m .,r,meter!) u!e Se'ect&on Tet! to !.ec&f* '&ter,'! t,t "&'' ,..e,r on te!creen -&, ed&t&n/ Tet E'ement! of te .ro/r,m$ T&! "&'' en,b'e te '&ter,' to be&m.'emented &n mu't&.'e ',n/u,/e!$

 A'' numer&c f&e'd! t,t m,* cont,&n , ne/,t&-e -,'ue !ou'd be d&!.',*ed or .r&nted "&t ,tr,&'&n/ m&nu! !&/n ?SAP !t,nd,rd@$

In te end of re.ort) &nc'ude te fo''o"&n/ &nform,t&on to /&-e u!er! , c'e,r &nd&c,t&on ,! to",t te re.ort con!&!t! of$ or e,m.'e:

End<U!er Re.ort!: !e'ect&on cr&ter&,) entr&e! found) ece.t&on!) etc$

Con-er!&onInterf,ce Re.ort!: number of record! re,d) number of record! .roce!!ed)number of record! "r&tten) d,tet&me) tr,n!,ct&on! .o!ted) etc$

Do not u!e ,rd<coded '&ter,'!$ U!e Tet E'ement! to ,nd'e '&ter,' tet t,t &! .r&nted on ,re.ort) te ,d-,nt,/e &! e,!&er m,&nt,&n,b&'&t*$

WRITE: / TEXT-001. “ writes error messageWRITE: / ‘Error’(001).

Tere !ou'd be no ,rd<cod&n/ of d,te form,t! &n te .ro/r,m!) Te d,te form,t of te

u!er! def,u't &nform,t&on ?SU50@ !ou'd be u!ed to out.ut ,n* d,te$ D,te! &n ASCII&nterf,ce f&'e! ?f',t f&'e!@ !ou'd be of te form CC7799DD$ T&! &! re,!on,b'*un,mb&/uou!) m,(e! !ure "e ,-e no *e,r 2000 &!!ue) ,nd ,''o"! te f&'e to be !orted onte d,te$ %en cre,t&n/ , =DC !e!!&on te A=AP !ou'd u!e te u!er def,u't d,te form,t"en form,tt&n/ te record for te !creen$ %e c,nt m,(e ,!!um.t&on! ,bout te d,teform,t of te u!er eecut&n/ te .ro/r,m$

Tere "&'' be no ,rd<cod&n/ of currenc* out.ut form,t! &n our .ro/r,m!$ Te dec&m,'not,t&on of te u!er! def,u't &nform,t&on ?SU50@ !ou'd be u!ed to out.ut ,n* currenc*-,'ue$

SAP current'* doe! not !u..ort mu't&.'e t&me one!) !o te t&me u!ed &n te !*!tem &! tet&me t,t te d,t,b,!e !er-er &! !et to$ Te !*!tem f&e'd S7<TFONE &nd&c,te! te t&me

d&fference &n !econd! to G9T t&me$

=,!&c e-ent !uc ,! START<O<SELECTION) END<O<SELECTION !ou'd be &nc'uded &nte .ro/r,m to &m.ro-e te re,d,b&'&t* of te .ro/r,m$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 30 of

Page 41: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 41/86

CODING GUIDELINES AND STANDARDS 

START-O-SE!E"TIO#.  $ Se%e&t &%a'se E#*-O-SE!E"TIO#.  $ Re+ort O't+'t

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 31 of

Page 42: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 42/86

CODING GUIDELINES AND STANDARDS 

8.0 Data Definition

,r&,b'e n,me! !ou'd be de!cr&.t&-e) me,n&n/fu' ,nd under!t,nd,b'e$

U!e CONSTANTS for te!e -,r&,b'e! "o!e -,'ue do not c,n/e?St,t&c D,t,@$

Def&ne CONSTANTS r,ter t,n Tet E'ement! for te!e non<out.ut ,rd code '&ter,'! &nte .ro/r,m$ or e,m.'e:

"O#STA#TS : ",O#E,TOSA#* TE I A!E 10002  ",TRE TE " A!E ‘TRE’2  ",A!SE TE " A!E ‘A!SE’.

or e,c f&e'd) &nc'ude , comment ?,fter te f&e'd@ de!cr&b&n/ te u!e or .ur.o!e of te f&e'd$

LI#E -erb &! u!ed "&'e dec',r&n/ te f&e'd! "ene-er fe,!&b'e) e$/$ "en ,!!&/n&n/ &ntern,'f&e'd! t,t ,re to o'd -,'ue! from d,t,b,!e!) u!e te LI#E o.t&on to en!ure t,t te-,r&,b'e! ,-e &dent&c,' c,r,cter&!t&c!$

D,t, 'en/t ,nd d,t, t*.e ,re not 'eft ,! def,u't$

On'* one t,b'e !,'' be '&!ted on ,n* one '&ne of te .ro/r,m) ,nd te t,b'e de!cr&.t&on!ou'd be ,dded ,! te end of '&ne comment$

=ampleE

TALE%: T001, 2oma"( #ode'T100, 2Me''age'TAPLT. 2Program a!#a$!o"'T+T, 2+!aog Modue'

INCLUDES ,re cre,ted for d,t, dec',r,t&on! ,nd ,n* d,t, !tructure! t,t "&'' be u!ed &nmore t,n one A=AP .ro/r,m$

Do not u!e f&e'd !*mbo'! un'e!! tere &! no !&m.'er metod ,-,&',b'e$ If f&e'd !*mbo'! ,reu!ed) te&r u!e mu!t be fu''* e.',&ned &n .ro/r,m comment! ,t te .',ce "ere te !*mbo'&! def&ned ,nd u!ed$

G'ob,' -,r&,b'e! ,re m&n&m&ed b* dec',r&n/ 'oc,' -,r&,b'e! or b* .,!!&n/ .,r,meter! "&'ecre,t&n/ &ntern,' !ubrout&ne!$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 32 of

Page 43: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 43/86

CODING GUIDELINES AND STANDARDS 

S.ec&f* te t*.e of f&e'd<!*mbo'! ,nd form,' .,r,meter! &n !ource code) te A=AP com.&'erc,n better o.t&m&e te code$

Field6Sym2ol wit#out type &yped Field6Sym2ol

IELD<S79=OLS: K$ IELD<S79=OLS: KI T7PE I$

 ASSIGN I1 TO K$ ASSIGN I1 TO KI$

I2 K$ I2 KI$

I6 K$ I6 KI$

I3 K$ I3 KI$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 36 of

Page 44: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 44/86

CODING GUIDELINES AND STANDARDS 

8.8 Online Standard

U!e D,t, D&ct&on,r* n,me! ?!ort) med&um) 'on/@ for f&e'd tet on !creen! "ere ,..'&c,b'e$

 A'",*! def&ne te f&e'd "&t , orm,t O# ,! O#_CODE$ T&! f&e'd &! u!ed to -,'&d,te te

O# E-ent$

Screen ,nd .ro/r,m f&e'd n,me! !ou'd /ener,''* be &dent&c,'$

Def&ne ,'' /'ob,' d,t, &n te m,&n .ro/r,m ?TOP@ modu'e &n!te,d of te P=OPAI$

To ,nd'e , 'oc( entr* f,&'ure) &n-o(e ,n error me!!,/e ?t*.e E@ to .re-ent ,n* furter.ro/re!! but 'e,-&n/ te u!er on te current !creen$ Te u!er c,n ten t,(e ,n ,'tern,t&-e,ct&on or cont&nue to tr* to 'oc( te ob>ect$ To m&n&m&e te &m.,ct on u!er!) '&m&t retr&e!$

%en ,ct&-,t&n/ button! or boe!) ,ct&-,te te ,!!oc&,ted tet ,! "e''$ T&! en,b'e! teu!er to c'&c( on e&ter te buttonbo or te tet$

Do not u!e AT Pnn &n .ro/r,m!$ In!te,d u!e te funct&on n,me !o t,t ,n* metod of&n-o(&n/ te funct&on "&'' ,-e te !,me effect ,! te u!e of te P<#e*$

8.: 7atc# Program M 'nterface Standards

9e!!,/e !t,tement! eecuted &n b,tc .ro/r,m! ,re out.ut to te tn S968 +ob Lo/$Succe!! me!!,/e! ?t*.e S@ !ou'd be u!ed /enerou!'* to .ro-&de ,n ,ud&t tr,&' of te.ro/r,m! eecut&on$

Inc'ude record count! to &nd&c,te te number of record! re,d ,nd .roce!!ed$ %r&te outece.t&on! to , re.ort$

Document .ro/r,m -,r&,nt?!@ &f , .ro/r,m need! to run "&t !.ec&,' .,r,meter!$

 An A=AP .ro/r,m t,t re,d! from or "r&te! to , !euent&,' d,t,!et !ou'd ,'",*! OPENte d,t,!et before te re,d"r&te o.er,t&on) ,nd ,fter f&'e .roce!!&n/ &t !ou'd CLOSE tef&'e$ A'tou/ te!e !t,tement! ,re not m,nd,tor*) &t &! /ood .r,ct&ce to &nc'ude tem$ A'!o) "&tout ,n OPEN DATASET !t,tement) , f&'e "&'' ,'",*! be o.ened &n =INAR7mode$ T&! m,* not be te mode reu&red

8.:.1 Define ogic filename as parameters

See t#e following e=ampleE

+ATA: 5_P+%NME LI>E FILENAME-FILEETERN. ?P)('!#a +a$a'e$Name.

+ATA: E5IN OF T_TA O7R% ...  EN+ OF T_TA.

PARAMETER%: P_L+%NME LI>E FILENAME-FILEINTERN ?Log!#a +a$a'e$ Name  +EFA7LT @7%TOMER_FILE@.

AT %ELETION-%REEN.  ALL F7NTION @FILE_5ET_NAME@  EPORTIN5  LO5IAL_FILENAME P_L+%NME

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 33 of

Page 45: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 45/86

CODING GUIDELINES AND STANDARDS 

IMPORTIN5FILE_NAME 5_P+%NAME

  EEPTION%  FILE_NOT_FO7N+ 01.

  IF %B-%7R CD 0.

*-------No )('!#a !e"ame #a" e de$erm!"ed or &  ME%%A5E E01M5GWIT8 P_L+%NME.  EN+IF.

%TART-OF-%ELETION.

OPEN +ATA%ET 5_P+%NME FOR O7TP7T IN TET MO+E.

IF %B-%7R CD 0.* I"'er$ error ro#e''!"g )ere.EN+IF.

TRAN%FER T_TA TO 5_P+%NME.

LO%E +ATA%ET 5_P+%NAME.

8. essage

9e!!,/e! ,re &nc'uded ,t ,..ro.r&,te .',ce! to &nd&c,te &''e/,' o.er,t&on) no ,utor&,t&on)no d,t, found) etc$

 A'tou/ con!&!tenc* "&t SAP<!u..'&ed me!!,/e! &! &/'* encour,/ed) do not u!e SAP<!u..'&ed def,u't me!!,/e ID!) ,! te!e ID! c,n c,n/e from re'e,!e to re'e,!e$ In!te,d)

co.* te!e me!!,/e! to cu!tomer me!!,/e ID!$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 35 of

Page 46: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 46/86

CODING GUIDELINES AND STANDARDS 

8. Program ogic

 A .ro/r,m !ou'd te!t te !*!tem return code f&e'd ?S7<SU=RC@ ,fter ,n* !t,tement! t,t

cou'd .otent&,''* c,n/e &t! -,'ue un'e!! te outcome of te !t,tement &! not &m.ort,nt for!ub!euent .roce!!&n/$

Te return code !ou'd ,'",*! be cec(ed ,fter ,n* d,t,b,!e t,b'e re,du.d,te!t,tement!$

or e/: SELECT V RO9 TA=NA$

  ENDSELECT$

  I S7<SU=RC 0$

  %RITE: H H

  ENDI$

 Autor&,t&on !ou'd be .erformed to ,nd'e te !ecur&t* of te .ro/r,m$

CEC# &! u!ed &n!te,d of IENDI "ene-er .o!!&b'e

CEC#) EIT) RE+ECT) STOP &! u!ed to !u!.end .roce!!&n/ or !(&. unnece!!,r*.roce!!&n/$

%en Cod&n/ I) ne!t true te!t&n/ cond&t&on!) !o t,t te outer cond&t&on! ,re mo!tfreuent'* true$

CASE !t,tement! ,re c'e,rer for 'e/&b&'&t* ,nd , '&tt'e f,!ter t,n I<con!truct&on!$ %ente!t&n/ f&e'd! eu,' to !omet&n/ one c,n u!e e&ter te ne!ted I or te CASE !t,tement$CASE !t,tement! ,re c'e,rer ,nd ,fter ,bout f&-e ne!ted If! te .erform,nce of te CASE&! more eff&c&ent$

%ILE &! u!ed &n!te,d of , DOWEIT<con!truct&on) bec,u!e %ILE &! e,!&er to under!t,nd,nd f,!ter to eecute$

Do J#ile

I1 0$ I1 0$

DO$ %ILE C1A SPACE$

I C1A NE SPACE$ EIT$ ENDI$ ADD 1 TO I1$

 ADD 1 TO I1$ I I1 GT 10$ C1A $ ENDI$

  I I1 GT 10$ C1A $ ENDI$ END%ILE$

ENDDO$

!untime easure;in microsec<E  5 !untime easure;in microsec<E 6

%otesE Te runt&me! de.&cted &n t&! m,nu,' ,re >u!t !,m.'e me,!urement) te* ,reme,!ured on mu't&<.roce!!or en-&ronment) te* ,re) o"e-er) not runt&meme,!urement bencm,r(!$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3 of

Page 47: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 47/86

CODING GUIDELINES AND STANDARDS 

U!e PEROR9 & O !t,tement "en c,''&n/ , cert,&n rout&ne b,!ed on , /&-en &nde) &n!te,d ofu!&n/ CASEX%ENPEROR9) !&nce te f&r!t !t,tement &! f,!t to eecute$

Case Perform i Of N

V ?I1 5 &n t&! te!t@ V ?I1 5 &n t&! te!t@

CASE I1$ PEROR9 I1 O

%EN 1$ PEROR9 P1$ P1

%EN 2$ PEROR9 P2$ P2

%EN 6$ PEROR9 P6$ P6

%EN 3$ PEROR9 P3$ P3

%EN 5$ PEROR9 P5$ P5

%EN $ PEROR9 P$ P

%EN 8$ PEROR9 P8$ P8

%EN $ PEROR9 P$ P$

!untime easure;in microsec<E 5 !untime easure;in microsec<E 2

LOOP X$ %ERE &! f,!ter t,n LOOPCEC# bec,u!e LOOP X$ %ERE e-,'u,te! te !.ec&f&ccond&t&on &ntern,''*$

oopMC#ec9 oopMJ#ere

LOOP AT ITA=$ LOOP AT ITA= %ERE NA9E1 #AL$

CEC# ITA=<NA9E1 #AL$ XXX$ENDLOOP$ ENDLOOP$

8.I Data (ccess

In , SELECT !t,tement) on'* te f&e'd! "&c ,re needed ,re !e'ected &n te order t,t te*re!&de on te d,t,b,!e) tu! net"or( 'o,d &! con!&der,b'* 'e!!$ Te number of f&e'd! c,n bere!tr&cted &n t"o ",*! u!&n/ , f&e'd '&!t &n te SELECT c',u!e of te !t,tement or b* u!&n/ ,-&e" def&ned &n A=AP D&ct&on,r*$ Te u!,/e of -&e" ,! te ,d-,nt,/e of better reu!,b&'&t*$

Select Select wit# select list

SELECT V RO9 DD01L SELECT DO9NA9E RO9 DD01L

%ERE DO9NA9E LI#E CARY INTO DD01L<DO9NA9E

 AND AS3LOCAL A$ %ERE DO9NA9E LI#E CARY

ENDSELECT$ AND AS3LOCAL A$

ENDSELECT$

!untime easure;in microsec<E

32)0

!untime easure;in microsec<E

11)302

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 38 of

Page 48: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 48/86

CODING GUIDELINES AND STANDARDS 

SELECT SINGLE &! u!ed &n!te,d of SELECT<ENDSELECT 'oo. "en te ent&re (e* &!,-,&',b'e$ SELECT SINGLE reu&re! one commun&c,t&on "&t te d,t,b,!e !*!tem)"ere,! SELECT<ENDSELECT need! t"o$

Select N ndselect Select Single

SELECT V RO9 SCARR SELECT SINGLE V RO9 SCARR

%ERE CARRID L$ %ERE CARRID L$

ENDSELECT$

!untime easure;in microsec<E 1 !untime easure;in microsec<E831

 A'",*! !.ec&f* te cond&t&on! &n te %ERE<c',u!e &n!te,d of cec(&n/ tem "&t cec(<

!t,tement! ) Te d,t,b,!e !*!tem c,n ten u!e ,n &nde ?&f .o!!&b'e@ ,nd te net"or( 'o,d&! con!&der,b'* 'e!!$ 7ou !ou'd not cec( te cond&t&on! "&t te CEC# !t,tementbec,u!e te content! of te "o'e t,b'e mu!t be re,d from te d,t,b,!e f&'e! &nto D=9Sc,ce ,nd tr,n!ferred o-er te net"or($ If te cond&t&on! ,re !.ec&f&ed &n te "ere c',u!eD=9S re,d! e,ct'* te needed d,t,$

Select C#ec9 statement Select wit# J#ere condition

SELECT V RO9 S=OO#$ SELECT V RO9 S=OO#

CEC#: S=OO#<CARRID L AND %ERE CARRID L AND

S=OO#<CONNID 0300$ CONNID 0300$ENDSELECT$ ENDSELECT$

!untime easure;in microsec<E 2)50B !untime easure;in microsec<E1)38B

Com.'e code &! not embedded "&t&n , SELECT ENDSELECT !t,tement$

No com.'e %ERE c',u!e!) !&nce com.'e "ere c',u!e! ,re .o&!on for te !t,temento.t&m&!er &n ,n* d,t,b,!e !*!tem$

or ,'' freuent'* u!ed SELECT !t,tement!) tr* to u!e ,n &nde$ 7ou ,'",*! u!e ,n &nde &f

*ou !.ec&f* ?, /ener&c .,rt of@ te &nde f&e'd! conc,ten,ted "&t 'o/&c,' AND! &n te Se'ect!t,tement! %ERE c',u!e$

Select wit#out inde= support Select wit# primary inde= support

SELECT V RO9 T100 SELECT V RO9 T002$

%ERE AR=G= 00 SELECT V RO9 T100

 AND 9SGNR BBB$ %ERE SPRSL T002<SPRAS

ENDSELECT$ AND AR=G= 00

 AND 9SGNR BBB$

ENDSELECT$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3 of

Page 49: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 49/86

CODING GUIDELINES AND STANDARDS 

ENDSELECT$

!untime easure;in microsec<E1)B5B)01B

!untime easure;in microsec<E 2)363

%en 'o,d&n/ d,t, &nto Intern,' t,b'e) INTO TA=LE OR APPENDING TA=LE &! u!ed &n!te,dof , SELECTAPPEND comb&n,t&on$ It &! ,'",*! f,!ter to u!e te Into T,b'e -er!&on of ,Se'ect !t,tement t,n to u!e A..end !t,tement!$

Select (ppend statement Select 'nto &a2le

RERES 00$ SELECT V RO9 T00 INTO TA=LE 00$

SELECT V RO9 T00 INTO 00$

 APPEND 00$

ENDSELECT$!untime easure;in microsec<E2)

!untime easure;in microsec<E B20

U!e , !e'ect '&!t "&t ,//re/,te funct&on! &n!te,d of cec(&n/ ,nd com.ut&n/) "en tr* tof&nd te m,&mum) m&n&mum) !um ,nd ,-er,/e -,'ue or te count of , d,t,b,!e co'umn)tu! net"or( 'o,d &! con!&der,b'* 'e!!$

Select N J#ere C#ec9 Select using an aggregate function

C3A 000$ SELECT 9A? 9SGNR @ RO9 T100INTO C3A

SELECT V RO9 T100 %ERE SPRSL D AND

%ERE SPRSL D AND AR=G= 00$

  AR=G= 00$

CEC#: T100<9SGNR C3A$

C3A T100<9SGNR$

ENDSELECT$

!untime easure;in microsec<E12)2

!untime easure;in microsec<E B)22

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3B of

Page 50: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 50/86

CODING GUIDELINES AND STANDARDS 

IE% or +OIN ,re u!ed to re.',ce ne!ted SELECT !t,tement) tu! net"or( 'o,d "&'' becon!&der,b'* 'e!!$ If te ne!ted SELECT &! u!ed te &nner !e'ect !t,tement &! eecuted!e-er,' t&me! "&c m&/t be ,n o-ere,d$

%ested Select statements Select wit# view

SELECT V RO9 DD01L SELECT V RO9 DD01

%ERE DO9NA9E LI#E CARY %ERE DO9NA9E LI#E CARY

 AND AS3LOCAL A$ AND DDLANGUAGE S7<LANGU$

SELECT SINGLE V RO9 DD01T ENDSELECT$

  %ERE DO9NA9E DD01L<DO9NA9E

 AND AS3LOCAL A

 AND AS3ERS DD01L< AS3ERS

 AND DDLANGUAGE S7<LANGU$

ENDSELECT$

!untime easure;in microsec<E250)861

!untime easure;in microsec<E 6B)B81

U!e SAP buffer&n/ for ,cce!!&n/ freuent'* u!ed) re,d<on'* t,b'e!) net"or( 'o,d c,n becon!&der,b'* 'e!!$ o"e-er) &n c,!e of retr&e-&n/ ',te!t d,t, &n mu't&<u!er en-&ronment) *ou

m,* need to b*.,!! te buffer$

Select wit#out 2uffer support Select wit# 2uffer support

SELECT SINGLE V RO9 T100 SELECT SINGLE V RO9 T100

=7PASSING =UER %ERE SPRSL D

%ERE SPRSL D AND AR=G= 00

 AND AR=G= 00 AND 9SGNR BBB$

  AND 9SGNR BBB$

!untime easure;in microsec<E 885 !untime easure;in microsec<E 8

%ene-er .o!!&b'e) u!e ,rr,* o.er,t&on! &n!te,d of !&n/'e<ro" o.er,t&on! to mod&f* *ourd,t,b,!e t,b'e!$ Te freuent commun&c,t&on bet"een te ,..'&c,t&on .ro/r,m ,ndd,t,b,!e !*!tem .roduce! con!&der,b'e o-ere,d$

Single6line 'nsert (rray 'nsert

LOOP AT TA=$ INSERT CUSTO9ERS RO9 TA=LE TA=$

  INSERT INTO CUSTO9ERSALUES TA=$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 50 of

Page 51: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 51/86

CODING GUIDELINES AND STANDARDS 

ENDLOOP$

!untime easure;in microsec<E 12 !untime easure;in microsec<E 12

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 51 of

Page 52: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 52/86

CODING GUIDELINES AND STANDARDS 

%ene-er .o!!&b'e) u!e co'umn u.d,te! &n!te,d of !&n/'e<ro" u.d,te! to u.d,te *ourd,t,b,!e t,b'e!$ net"or( 'o,d c,n ten be con!&der,b'* 'e!!$

 

Single6line updates Column update

SELECT V RO9 SLIGT$ UPDATE SLIGT

SLIGT<SEATSOCC SET SEATSOCC SEATSOCC < 1$

SLIGT<SEATSOCC < 1$

UPDATE SLIGT$

ENDSELECT$

!untime easure;in microsec<E)053

!untime easure;in microsec<E 1)518

EIT &! u!ed "&t&n SELECT ENDSELECT &f te ent&re (e* &! not ,-,&',b'e ,nd on'* ",ntto retr&e-e te f&r!t m,tc&n/ record$

ORDER =7 !t,tement &! u!ed &n SELECT on'* &f &t c,n u!e ,n &nde e'!e !ort&n/ &! effect&-eb* re,d&n/ &nto ,n &ntern,' t,b'e ,nd u!e te SORT !t,tement &n te .ro/r,m$

Order 2y wit# inde= Order 2y wit#out inde=

SELECT V RO9 SPLI ORDER =7 SELECT V RO9 SPLI ORDER =7

PRI9AR7 #E7$ AIRPRO9 AIRPTO$

ENDSELECT$

!untime easure;in microsec<E 6)16 !untime easure;in microsec<E 6)B5B

U!e 'o/&c,' d,t,b,!e ,! ,..ro.r&,te$ Lo/&c,' d,t,b,!e &m.'&c&t'* eecute! ,utor&,t&oncec(&n/ for d,t, ,cce!!) but e-en &f *ou >u!t ,cce!! one t,b'e) *ou "&'' !t&'' need to ,cce!!,'' te t,b'e! ,bo-e te current &er,rc* 'e-e' &n 'o/&c,' d,t,b,!e) "&c cre,te! d,t,,cce!! &neff&c&enc*$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 52 of

Page 53: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 53/86

CODING GUIDELINES AND STANDARDS 

8.1) 'nternal &a2le

o''o"&n/ Accenture off!ore de-e'o.ment !t,nd,rd /u&de'&ne!) te e,der '&ne of &ntern,'t,b'e &! c'e,red before mo-&n/ d,t, &nto &t$

U!e e.'&c&t "or( ,re, o.er,t&on! r,ter t,n e,d '&ne "ere ,..ro.r&,te) !&nce e,d '&ne"&'' ,-e unnece!!,r* 9OE! &n-o'-ed

$

&a2le operation via #eader line &a2le operation via e=plicit wor9 area

V Te '&ne "&dt of t,b'e TA= &! 500 b*te! V Te '&ne "&dt of t,b'e TA= &! 500b*te!

TA= TA=_%A$ APPEND TA=_%A TO TA=$

 APPEND TA=$

!untime easure;in microsec<E 3 !untime easure;in microsec<E 6

%en 'o,d&n/ d,t, &nto Intern,' t,b'e) INTO TA=LE OR APPENDING TA=LE &! u!ed &n!te,dof , SELECTAPPEND comb&n,t&on$ See 3$B$8$

Intern,' t,b'e &! def&ned "&t HOCCURS 0 &f te m,&mum !&e of te t,b'e &! .otent&,''*#$ If te d,t, to be re,d &! e!t&m,ted to be under #) ten !.ec&f*&n/ te number of'&ne! &n te OCCURS !t,tement?e$/$ &t,b1 occur! 10@ &! effect&-e$

9OE u!ed &n!te,d of 9OE<CORRESPONDING for eff&c&enc* .ur.o!e) 9OE<CORRESPONDING &! u!ed on'* "en t"o t,b'e! ,-e !,me f&e'd !tructure$

U!e one<!te. ,..ro,c READINSERT) If te ,mount of d,t, &! !m,'' ?K 20 entr&e!@) or &fu!er! need re,d<,cce!! to te &ntern,' t,b'e "&'e &t &! be&n/ f&''ed) o"e-er) &f te d,t,,mount &! ',r/er ,nd *ou need re,d<,cce!! on'* to te com.'ete'*<f&''ed t,b'e) te t"o<!te.,'/or&tm APPENDSORT or tree<!te. ,..ro,c APPENDSORTDELETE DUPLICATE?for t,b'e! "&tout du.'&c,te!@ &! .refer,b'e$

One6step approac#E !(DM'%S!& &wo6step approac#E (PP%D4 t#enSO!&

V TA=_DEST &! f&''ed "&t 1000 entr&e! V TA=_DEST &! f&''ed "&t 1000 entr&e!

RERES TA=_DEST$ RERES TA=_DEST$

LOOP AT TA=_SRC$ LOOP AT TA=_SRC$

READ TA=LE TA=_DEST %IT APPEND TA=_SRC TO TA=_DEST$

#E7 # TA=_SRC<# =INAR7SEARC$

ENDLOOP$

INSERT TA=_SRC INTO TA=_DESTINDE S7<TA=I$

SORT TA=_DEST =7 #$

ENDLOOP$!untime easure;in microsec<E !untime easure;in microsec<E 11)558

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 56 of

Page 54: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 54/86

CODING GUIDELINES AND STANDARDS 

31)80

One6step approac# &#ree6stepsE copy4 sort4 deleteduplicates

V TA=_SRC cont,&n! 1000 entr&e!) of

"&c 500 ,re d&fferent

V TA=_SRC cont,&n! 1000 entr&e!) 500

,re d&fferent

 

RERES TA=_DEST$ RERES TA=_DEST$

LOOP AT TA=_SRC$ LOOP AT TA=_SRC$

READ TA=LE TA=_DEST %IT APPEND TA=_SRC TO TA=_DEST$

#E7 # TA=_SRC<# =INAR7SEARC$

ENDLOOP$

I S7<SU=RC K 0$ SORT TA=_DEST =7 #$

INSERT TA=_SRC INTO TA=_DEST DELETE AD+ACENT DUPLICATESRO9

INDE S7<TA=I$ TA=_DEST CO9PARING #$

  ENDI$

ENDLOOP$

!untime easure;in microsec<E22)6

!untime easure;in microsec<E 13)

COLLECT &! u!ed &n!te,d of READ=INAR7INSERT If number of entr&e! /re,ter t,n 1000$

READ =INAR7 run! &n O? 'o/2? n @ @ t&me) ,nd te &ntern,' t,b'e! &nde mu!t be ,d>u!ted"&t e,c INSERT ) o"e-er) COLLECT u!e! , ,! ,'/or&tm ,nd &! terefore&nde.endent of te number of entr&e! ,nd doe! not need to m,&nt,&n , t,b'e &nde$ If te,mount of d,t, &! !m,'') te READINSERT ,..ro,c &!nt b,d) but for ',r/e ,mount! ofd,t, ? 1000@) COLLECT &! muc f,!ter$

COC& semantics using !(D7'%(!/

Collect via COC& statement

V T,b'e TA=_SRC &! f&''ed "&t 10)000entr&e!)

V T,b'e TA=_SRC &! f&''ed "&t 10)000entr&e!)

V 5)000 of "&c ,-e d&fferent (e*! V 5)000 of "&c ,-e d&fferent (e*!

LOOP AT TA=_SRC$ LOOP AT TA=_SRC$

READ TA=LE TA=_DEST %IT COLLECT TA=_SRC INTO TA=_DEST$

  #E7 # TA=_SRC<# =INAR7SEARC$

ENDLOOP$

I S7<SU=RC 0$ SORT TA=_DEST =7 #$

  ADD: TA=_SRC<AL1 TO TA=_DEST<AL1)

TA=_SRC<AL2 TO TA=_DEST<AL2$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 53 of

Page 55: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 55/86

CODING GUIDELINES AND STANDARDS 

9ODI7 TA=_DEST INDE S7<TA=I$

  ELSE$

INSERT TA=_SRC INTO TA=_DESTINDE S7<TA=I$

ENDI$

ENDLOOP$

!untime easure;in microsec<E80B)60

!untime easure;in microsec<E11)322

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 55 of

Page 56: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 56/86

CODING GUIDELINES AND STANDARDS 

COLLECT &! not u!ed "&t te comb&n,t&on of APPEND) INSERT ,ndor 9ODI7 "enf&''&n/ &n te &ntern,' t,b'e$ If COLLECT &! m&ed "&t te oter !t,tement!) &t c,nnot u!e &t!,! ,'/or&tm$ In t&! c,!e) COLLECT re!ort! to , norm,' '&ne,r !e,rc) "&c &!dr,m,t&c,''* !'o"er$

U!&n/ =INAR7 SEARC &n!te,d of '&ne,r !e,rc "en &ntern,' t,b'e ,! more t,n 20entr&e!$ If TA= ,! n entr&e!) '&ne,r !e,rc run! &n O? n @ t&me) "ere,! b&n,r* !e,rc t,(e!on'* O? 'o/2? n @ @$ And ,'!o "en re,d&n/ , !&n/'e record &n ,n &ntern,' t,b'e) te READTA=LE %IT #E7 &! not , d&rect READ$ Terefore) SORT te t,b'e ,nd u!e READ TA=LE%IT #E7 =INAR7 SEARC$

inear searc# of an internal ta2le 7inary searc# of an internal ta2le

V T,b'e TA= &! f&''ed "&t 1000 entr&e! V T,b'e TA= &! f&''ed "&t 1000 entr&e! of100 b*te! e,c

V Te READ end! "&t S7<SU=RC3 V Te READ end! "&t S7<SU=RC3

READ TA=LE TA= %IT #E7 # $ READ TA=LE TA= %IT #E7 # =INAR7 SEARC$

!untime easure;in microsec<E 85 !untime easure;in microsec<E 11

S.ec&f* te (e* f&e'd! for re,d ,cce!! e.'&c&t'*) u!e READ TA=LE %IT #E7 ( H&n!te,d of READ TA=LE %IT #E7$ Oter"&!e) te (e* f&e'd! ,-e to be com.utedd*n,m&c,''* b* te run t&me !*!tem$

(ccess via implicit default 9ey (ccess via 9ey specified e=plicitly

V T,b'e TA= &! f&''ed "&t 60 entr&e! of 500b*te! e,c

V T,b'e TA= &! f&''ed "&t 60 entr&e! of500 b*te! e,c

V Te READ end! "&t S7<SU=RC3 V Te READ end! "&t S7<SU=RC3

9OE SPACE TO TA=$ READ TA=LE TA= %IT #E7 # =INAR7 SEARC$

TA=<# $

READ TA=LE TA= =INAR7 SEARC$

!untime easure;in microsec<E 15 !untime easure;in microsec<E 8

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5 of

Page 57: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 57/86

CODING GUIDELINES AND STANDARDS 

LOOP $$$ %ERE &! f,!ter t,n LOOPCEC# bec,u!e LOOP $$$ %ERE e-,'u,te! te!.ec&f&ed cond&t&on &ntern,''*$ Te .erform,nce c,n be furter en,nced &f LOOP $$$%ERE &! comb&ned "&t RO9 &1 ,ndor TO &2) &f .o!!&b'e$

-ey access wit# OOPMCHC- -ey access wit# OOP N JH!

V T,b'e TA= &! f&''ed "&t 100 entr&e! of500 b*te! e,c)

V T,b'e TA= &! f&''ed "&t 100 entr&e! of500 b*te! e,c)

V 5 entr&e! of "&c m,tc te (e*cond&t&on

V 5 entr&e! of "&c m,tc te (e*cond&t&on

LOOP AT TA=$ LOOP AT TA= %ERE # #AL$

CEC# TA=<# #AL$ $$$

$$$ ENDLOOP$

ENDLOOP$

!untime easure;in microsec<E 10 !untime easure;in microsec<E 12

Intern,' t,b'e! c,n be com.,red) co.&ed &n 'o/&c,' e.re!!&on! >u!t '&(e oter d,t, ob>ect!$T"o &ntern,' t,b'e! ,re eu,' &f

< te* ,-e te !,me number of '&ne! ,nd

< e,c .,&r of corre!.ond&n/ '&ne! &! eu,'$

If ,n &ntern,' t,b'e &t,b ,! , e,der '&ne) te t,b'e &t!e'f &! ,cce!!ed b* &t,bZ[$

Pedestrian way to compare internalta2les

et t#e 9ernel to do t#e wor9 N

V T,b'e! TA=1 ; TA=2 ,re e,c f&''ed "&t100 entr&e!

V T,b'e! TA=1 ; TA=2 ,re e,c f&''ed"&t 100 entr&e!

V of 100 =*te! e,c$ V of 100 =*te! e,c$

DESCRI=E TA=LE: TA=1 LINES L1) I TA=1Z[ TA=2Z[$

TA=2 LINES L2$ $$$

ENDI$

I L1 K L2$

TA=_DIERENT $

ELSE$

TA=_DIERENT SPACE$

LOOP AT TA=1$

READ TA=LE TA=2 INDE S7<TA=I$

I TA=1 K TA=2$

TA=_DIERENT $ EIT$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 58 of

Page 58: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 58/86

CODING GUIDELINES AND STANDARDS 

ENDI$

ENDLOOP$

ENDI$

I TA=_DIERENT SPACE$

$$$

ENDI$

!untime easure;in microsec<E 831 !untime easure;in microsec<E 152

S.ec&f* te !ort f&e'd! on te !ort !t,tement) not 'e,-e te f&e'd! ,! def,u't) te morere!tr&ct&-e'* *ou !.ec&f* te !ort (e*) te f,!ter te .ro/r,m "&'' run$

Sort internal ta2le wit# default sort 9ey Sort wit# sort 9ey specified e=plicitly

V T,b'e TA= &! f&''ed "&t 100 entr&e! of500 b*te! e,c

V T,b'e TA= &! f&''ed "&t 100 entr&e! of500 b*te! e,c

SORT TA=$ SORT TA= =7 #$

!untime easure;in microsec<E 506 !untime easure;in microsec<E 658

U!e .,r,''e' cur!or &n!te,d of >o&n t"o t,b'e! or ne!ted 'oo.$ If TA=1 ,! n1 entr&e! ,nd

TA=2 ,! n2 entr&e!) te t&me needed for >o&n&n/ TA=1 ,nd TA=2 "&t te !tr,&/tfor",rd,'/or&tm &! O? n1 V 'o/2? n2 @ @) ne!ted 'oo. &! O? n1 V n2 @) "ere,! te .,r,''e' cur!or,..ro,c t,(e! on'* O? n1 W n2 @ t&me$

%ative joinE loop ta214 read ta2* wit#9ey

ore sop#isticatedE use parallelcursor

V T,b'e TA=1 &! f&''ed "&t 1000 entr&e! of100 b*te! e,c

V T,b'e TA=1 &! f&''ed "&t 1000 entr&e! of 100 b*te! e,c

V T,b'e TA=2 &! f&''ed "&t 600 entr&e! of100 b*te! e,c

V T,b'e TA=2 &! f&''ed "&t 600 entr&e! of 100 b*te! e,c

V T,b'e TA=2 &! ,!!umed to be !orted b*# &n ,!cend&n/

V T,b'e! TA=1 ; TA=2 to be !orted b* #,!cend&n/

V order 

  I2 1$

LOOP AT TA=1$ LOOP AT TA=1$

READ TA=LE TA=2 %IT #E7 READ TA=LE TA=2 INDE I2$

# TA=1<# =INAR7 SEARC$ I S7<SU=RC K 0$ EIT$ ENDI$

I S7<SU=RC 0$ I TA=2<# TA=1<#$

$$$ $$$ENDI$ ADD 1 TO I2$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5 of

Page 59: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 59/86

CODING GUIDELINES AND STANDARDS 

ENDLOOP$ ENDI$

ENDLOOP$

!untime easure;in microsec<E 1)826 !untime easure;in microsec<E )22

Straig#t forward nested loop ore sop#isticated loopE parallelcursor

V T,b'e TA=1 &! f&''ed "&t 100 entr&e! of100 b*te! e,c

V TA=1 &! f&''ed "&t 100 entr&e! of 100b*te! e,c

V T,b'e TA=2 &! f&''ed "&t 10 V 100 1000 entr&e! of

V TA=2 &! f&''ed "&t 10 V 100 1000entr&e! of 100 b*te! e,c

V 100 b*te! e,c V TA=1 ; TA=2 ,!!umed to be !orted b*# &n ,!cend&n/ order

LOOP AT TA=1$ I2 1$

LOOP AT TA=2 %ERE # TA=1<#$ LOOP AT TA=1$

M X LOOP AT TA=2 RO9 I2$

ENDLOOP$ I TA=2<# K TA=1<#$

ENDLOOP$ I2 S7<TA=I$

EIT$

ENDI$

M X

ENDLOOP$

ENDLOOP$

!untime easure;in microsec<E10)382

!untime easure;in microsec<E )6B

U!e te 9ODI7 -,r&,nt 9ODI7 &t,b $$$ TRANSPORTING f1 f2 $$$ for !&n/'e '&ne) ,nd9ODI7 &t,b $$$ TRANSPORTING f1 f2 $$$ %ERE cond&t&on for , !et of '&ne) to ,cce'er,tete u.d,t&n/ of &ntern,' t,b'e$ Te 'on/er te t,b'e '&ne &!) te ',r/er te !.eed<u. &!$ Teeffect &ncre,!e! for t,b'e! "&t com.'e !tructured '&ne t*.e!$

odifying all components of single line odifying selected components only

V T,b'e TA= &! f&''ed "&t 5000 entr&e! of500 b*te! e,c$

V T,b'e TA= &! f&''ed "&t 5000 entr&e! of500 b*te! e,c$

V On'* te b*te! of te com.onentDATE ,re mod&f&ed$

V On'* te b*te! of te com.onentDATE ,re mod&f&ed$

LOOP AT TA=$ %A<DATE S7<DATU9$

TA=<DATE S7<DATU9$ LOOP AT TA=$

9ODI7 TA=$ 9ODI7 TA= RO9 %ATRANSPORTING DATE$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5B of

Page 60: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 60/86

CODING GUIDELINES AND STANDARDS 

ENDLOOP$ ENDLOOP$

!untime easure;in microsec<E 5)32 !untime easure;in microsec<E 56)3B

odifying all components of lines odifying selected components only

V T,b'e TA= &! f&''ed "&t 100 entr&e!$ A'&ne ,! t"o V T,b'e TA= &! f&''ed "&t 100 entr&e!$ A'&ne ,! t"o

V com.onent!) , LAG of t*. C ,nd ,n&nte/er t,b'e

V com.onent!) , LAG of t*. C ,nd ,n&nte/er t,b'e

V INTTA= "&t 20 entr&e! e,c$ V INTTA= "&t 20 entr&e! e,c$

V Te ',/ &! !"&tced on for ,'' 100 '&ne!$ V Te ',/ &! !"&tced on for ,'' 100'&ne!$

LOOP AT TA=$ TA=<LAG $

I TA=<LAG IS INITIAL$ 9ODI7 TA= TRANSPORTING LAGTA=<LAG $ %ERE LAG IS INITIAL$

  ENDI$

9ODI7 TA=$

ENDLOOP$

!untime easure;in microsec<E )1B0 !untime easure;in microsec<E 265

U!e APPEND LINES O &t,b1 TO &t,b2 ,nd INSERT LINES O &t,b1 INTO &t,b2 INDE &d&n!te,d of APPEND ,nd INSERT$ And tu! te t,!( of ,..end&n/ ,nd &n!ert , t,b'e to,noter t,b'e c,n be tr,n!ferred to te (erne'$

Pedestrian way to append a ta2le et t#e 9ernel to do t#e wor9 N

V T,b'e TA=_SRC ,nd TA=_DEST ,rebot f&''ed "&t 500

V T,b'e TA=_SRC ,nd TA=_DEST ,rebot f&''ed "&t 500

V entr&e! of 100 b*te! e,c$ TA=_SRC &!,..ended '&ne b*

V entr&e! of 100 b*te! e,c$ TA=_SRC &!,..ended &n ,

V '&ne to TA=_DEST$ V !&n/'e !te. to TA=_DEST$

 

LOOP AT TA=_SRC$ APPEND LINES O TA=_SRC TOTA=_DEST$

  APPEND TA=_SRC TO TA=_DEST$

ENDLOOP$

!untime easure;in microsec<E 6)81 !untime easure;in microsec<E 8B1

Pedestrian way to insert a ta2le et t#e 9ernel to do t#e wor9 N

V T,b'e TA=_SRC ,nd TA=_DEST ,re

bot f&''ed "&t 500

V T,b'e TA=_SRC ,nd TA=_DEST ,re

bot f&''ed "&t 500V entr&e! of 100 b*te! e,c$ TA=_SRC &! V entr&e! of 100 b*te! e,c$ TA=_SRC &!

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 0 of

Page 61: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 61/86

CODING GUIDELINES AND STANDARDS 

&n!erted '&ne b* &n!erted &n ,

V '&ne to TA=_DEST ,t &nde ID$ V !&n/'e !te. to TA=_DEST ,t &nde ID$

 

ID 250$ ID 250$

LOOP AT TA=_SRC$ INSERT LINES O TA=_SRC INTO

INSERT TA=_SRC INTO TA=_DESTINDE ID$

TA=_DEST INDE ID$

  ADD 1 TO ID$

ENDLOOP$

!untime easure;in microsec<E 1)121 !untime easure;in microsec<E 35

U!e DELETE AD+ACENT DUPLICATES DELETE &t,b RO9 $$$ TO $$$ DELETE &t,b

ZRO9 $$$[ ZTO $$$[ %ERE $$$ &n!te,d of DELETE) to tr,n!fer te t,!( of de'et&n/ entr&e! tote (erne'$

Pedestrian way to delete duplicates et t#e 9ernel to do t#e wor9 N

V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 100 b*te!

V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 100 b*te!

V e,c ,nd cont,&n! 500 .,&r! ofdu.'&c,te!

V e,c ,nd cont,&n! 500 .,&r! ofdu.'&c,te!

READ TA=LE TA=_DEST INDE 1 INTO DELETE AD+ACENT DUPLICATESRO9

PRE_LINE$ TA=_DEST CO9PARING #$

LOOP AT TA=_DEST RO9 2$

I TA=_DEST PRE_LINE$

DELETE TA=_DEST$

ELSE$

PRE_LINE TA=_DEST$

ENDI$

ENDLOOP$

Pedestrian way to delete a se3uenceof lines

et t#e 9ernel to do t#e wor9 N

V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 500 b*te!

V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 500 b*te!

V e,c) ,nd '&ne! 350 to 550 ,re to bede'eted

V e,c) ,nd '&ne! 350 to 550 ,re to bede'eted

DO 101 TI9ES$ DELETE TA=_DEST RO9 350 TO550$

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1 of

Page 62: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 62/86

CODING GUIDELINES AND STANDARDS 

DELETE TA=_DEST INDE 350$

ENDDO$

Pedestrian way to delete a set of lines et t#e 9ernel to do t#e wor9 N

V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 500 b*te! V T,b'e TA=_DEST &! f&''ed "&t 1000entr&e! of 500 b*te!

V e,c) 250 of "&c m,tc te %EREcond&t&on

V e,c) 250 of "&c m,tc te %EREcond&t&on

LOOP AT TA=_DEST %ERE # #AL$ DELETE TA=_DEST %ERE # #AL$

  DELETE TA=_DEST$

ENDLOOP$

!untime easure;in microsec<E 3)16 !untime easure;in microsec<E 6)881

Te .erform,nce /,&n "en u!&n/ DELETE &t,b %ERE $$$ &n!te,d of LOOP AT &t,b%ERE $$$ DELETE &t,b$ ENDLOOP$ &ncre,!e! "&t te number of entr&e! te &ntern,' t,b'econt,&n! ,nd te number of '&ne! to be de'eted$

If te d,t, &! .roce!!ed on'* once) u!e , SELECT<ENDSELECT 'oo. &n!te,d ofco''ect&n/ d,t, &n ,n &ntern,' t,b'e "&t SELECT X$INTO TA=LE bec,u!e te Intern,' t,b'e,nd'&n/ t,(e! u. muc more !.,ce$

 

SELECT V RO9 KTA=LE SELECT V RO9 KTA=LE

 INTO TA=LE KINT<TA= ENDSELECT

 LOOP AT KINT<TA=$

  XXXX$$

 ENDLOOP$

Intern,' t,b'e! c,n be co.&ed b* mo-e >u!t '&(e ,n* oter d,t, ob>ect$ If te t,b'e ,! ,e,der '&ne ten te t,b'e! need to be referenced b* !u,re br,c(et!$

 

ITA=Z[ ITA=1Z[$ LOOP AT ITA= INTO ITA=1$

  APPEND ITA=1$

 ENDLOOP$

8.11 String Operation

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2 of

Page 63: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 63/86

CODING GUIDELINES AND STANDARDS 

U!e te !.ec&,' o.er,tor! CO) CA) CS) &n!te,d of .ro/r,mm&n/ te o.er,t&on! *our!e'f$ If A=AP !t,tement! ,re eecuted .er c,r,cter on 'on/ !tr&n/!) CPU con!um.t&on c,n r&!e!ub!t,nt&,''*$

DO6oop wit# Field6Sym2ols +sing t#e C( operator  

 ASSIGN CA?1@ TO KC$ I CA?200@ CA ?@$

$$$,n* ,ct&on!

DO 200 TI9ES$ ENDI$

  I KC ? OR KC @$

$$$,n* ,ct&on!

EIT$

ENDI$

 ASSIGN KCW1 TO KC$

ENDDO$

!untime easure;in microsec<E 56 !untime easure;in microsec<E 20

Some funct&on modu'e! for !tr&n/ m,n&.u',t&on ,-e become ob!o'ete ,nd !ou'd bere.',ced b* A=AP !t,tement! or funct&on!:

STRING_CONCATENATE$$$ < CONCATENATE)

STRING_SPLIT$$$ < SPLIT)

STRING_LENGT < !tr'en?@)

STRING_CENTER < %RITE$$$TO$$$CENTERED)

STRING_9OE_RIGT < %RITE$$$TO$$$RIGT<+USTIIED)

+se of a CO%C(&!%(& functionmodule

+se of t#e CO%C(&!%(& statement

 CALL UNCTIONSTRING_CONCATENATE_6

CONCATENATE T100<AR=G=

  EPORTING T100<9SGNR

  STRING1 T100<AR=G= T100<TET INTO CLA$  STRING2 T100<9SGNR

STRING6 T100<TET

I9PORTING

STRING CLA

ECEPTIONS

TOO_S9ALL 01$

!untime easure;in microsec<E 8 !untime easure;in microsec<E 6

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6 of

Page 64: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 64/86

CODING GUIDELINES AND STANDARDS 

U!e te CONCATENATE SPLIT !t,tement &n!te,d of .ro/r,mm&n/ , !tr&n/ conc,ten,t&onof *our o"n$

oving wit# offset +se of t#e CO%C(&!%(& statement

  9OE +,ne TO C9A$ 9OE +,ne TO C9A$

9OE 9&''er TO C9=$ 9OE 9&''er TO C9=$

9OE Ne" 7or( C&t* TO C9C$ 9OE Ne" 7or( C&t* TO C9C$

I1 STRLEN? C9A @$ I2 STRLEN? C9= @$

CONCATENATE

9OE 9r!$ TO CA$ 9r!$ C9A C9= from C9C INTO CA

9OE C9A TO CAW5$ I1 I1 W $ SEPARATED =7 SPACE$

9OE C9= TO CAWI1$ I1 I1 W I2 W9OE from TO CAWI1$ I1 I1 W 5$

9OE C9C TO CAWI1$

9r!$ +,ne 9&''er from Ne" 7or( C&t* I 9r!$ +,ne 9&''er from Ne" 7or( C&t* &

+se of S(!CH and O" wit# Offset +se of t#e SP'& statement

C9A cont,&n! ?310@<35183<653612,nd !,''

C9A cont,&n! ?310@<35183<653612,nd !,''

 be !.'&t &nto AREA_CODE) be !.'&tted &nto AREA_CODE)

TEL_NO1) TEL_NO1)

TEL_NO2$ TEL_NO2$

SEARC C9A OR <$

9OE C9A?S7<DPOS@ TO AREA_CODE$

I1 S7<DPOS W 2$ SPLIT C9A AT < INTO AREA_CODE

SEARC C9A OR < STARTING AT I1$ TEL_NO1

I1 I1 < 1$ TEL_NO2$

9OE C9AWI1?S7<DPOS@ TOTEL_NO1$

I1 I1 W S7<DPOS W 1$

9OE C9AWI1 TO TEL_NO2$

!untime easure;in microsec<E 28 !untime easure;in microsec<E 3

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3 of

Page 65: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 65/86

CODING GUIDELINES AND STANDARDS 

If *ou ",nt to de'ete te 'e,d&n/ !.,ce! &n , !tr&n/) u!e te A=AP !t,tement SIT$$$LETDELETING LEADING$$$ $ Oter con!truct&on! ?"&t CN ,nd SIT$$$=7 S7<DPOSPLACES) "&t CONDENSE &f .o!!&b'e) "&t CN ,nd ASSIGN CLAWS7<DPOS?LEN@ $$$@ ,renot ,! f,!t$ In ,n* c,!e) ,-o&d u!&n/ SIT &n!&de , %ILE<'oo.

S#ifting 2y S/6FDPOS places. +sing SH'F& N F& D&'%G(D'%G N

CLA cont,&n! te !tr&n/ CLA cont,&n! te !tr&n/

Ed&tor '&ne n$ Ed&tor '&ne n$

I CLA CN SPACE$ ENDI$

SIT CLA =7 S7<DPOS PLACESLET$

SIT CLA LET DELETING LEADINGSPACE$

!untime easure;in microsec<E 5 !untime easure;in microsec<E 6

U!e te !tr'en? @ funct&on to re!tr&ct te DO 'oo. to te re'e-,nt .,rt of te f&e'd) e$/$ "endeterm&n,t&n/ , cec(<!um$

Get a c#ec96sum wit# field lengt# Get a c#ec96sum wit# strlen;<

DATA: =EGIN O STR) LINE T7PE )END

DATA: =EGIN O STR) LINE T7PE )END

 O STR) CEC#_SU9 T7PE I$ O STR) CEC#_SU9 T7PE I$

9OE #ALE=P4DSCG TO CLA$ 9OE #ALE=P4DSCG TO CLA$

I1 STRLEN? CLA @$

DO 3 TI9ES AR7ING STR RO9 CLANET CLAW1$

DO I1 TI9ES AR7ING STR RO9 CLANET CLAW1$

CEC# STR NE SPACE$ CEC# STR NE SPACE$

 ADD STR<LINE TO CEC#_SU9$ ADD STR<LINE TO CEC#_SU9$

ENDDO$ ENDDO$

U!e CLEAR f %IT -,' "ene-er *ou ",nt to &n&t&,'&e , f&e'd "&t , -,'ue d&fferent fromte f&e'd! t*.e<!.ec&f&c &n&t&,' -,'ue$

'nitialiQing wit# C(!M&!(%S(& 'nitialiQing wit# C(! J'&H val

V STRING &! , 255 b*te c,r,cter f&e'd V STRING &! , 255 b*te c,r,cter f&e'd

CLEAR STRING$ CLEAR STRING %IT V$

TRANSLATE STRING USING V$

!untime easure;in microsec<E 11 !untime easure;in microsec<E 1

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5 of

Page 66: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 66/86

CODING GUIDELINES AND STANDARDS 

:.)(PP%D'B 6 S9eleton Programs

Te A=AP M!(e'eton .ro/r,m! '&!ted &n t&! !ect&on !o" o" -,r&ou! A=AP .ro/r,m!

!ou'd be !tructured$ A! f,r ,! .o!!&b'e ,nd ,..ro.r&,te) te&r !tructure !ou'd be fo''o"ed$

  FS#ELTP01 << =,!&c A=AP L&!t Re.ort

  FS#ELTP02 << Inter,ct&-e A=AP L&!t Re.ort

  FS#ELTP06 << Cre,te , Seuent&,' D,t,!et

  FS#ELTP03 << Re,d , Seuent&,' D,t,!et ,nd Cre,te , =,tc In.ut Se!!&on

  FS#ELTP05 << CALL TRANSACTION USING Tecn&ue

  FS#ELSR01<< Gener,' !ubrout&ne! ?re.ort e,der) footer) etc$@

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e of

Page 67: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 67/86

CODING GUIDELINES AND STANDARDS 

:.1 (PP%D'B 1. 7asic (7(P ist !eport

*&---------------------------------------------------------------------**& Program Name : ZSKELTP01 *

*& Title : Basic ABAP List Report **& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/**& ,escriptio# : T%is is a program template 5or Basic ABAP List **& Report2 **&---------------------------------------------------------------------*

*& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/ **& **& 0001 <<.<<.<< <<<<< <<<<< <<<<<<< <<<<<<<< << <<<< **& <<<<<<<<< <<< <<< <<<<<<<< **& **& 000= <<.<<.<< <<<<<< <<< <<<<<< <<<<<< <<<<<: <<<<<<<< **& <<<<<<<<< <<<<<< <<<< <<<<> *

*& <<<<<< <<<< <<<< <<<<> <<<2 **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REP'RT ZSKELTP01  N' STAN,AR, PA7E EA,3N7  MESSA7E-3, ??  L3NE-'9NT /  L3NE-S3ZE 1=02

*&---------------------------------------------------------------------**& TABLES*&---------------------------------------------------------------------*TABLES: 22222

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*'NSTANTS: 22222

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*,ATA: 22222

*&---------------------------------------------------------------------**& STR9T9RES

*&---------------------------------------------------------------------*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 8 of

Page 68: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 68/86

CODING GUIDELINES AND STANDARDS 

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& SELET-'PT3'NS

*&---------------------------------------------------------------------*SELET-'PT3'NS: 22222

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*PARAMETERS: 22222

************************************************************************* 3N3T3AL3ZAT3'N************************************************************************* Ee#t @%ic% occ!rs $e5ore t%e selectio# scree# is* s%o@# to t%e !ser2

3N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************* Ee#t @%ic% occ!rs eac% time t%e !ser %its e#ter o# t%e selectio#* scree#2

 AT SELET3'N-SREEN2

************************************************************************* T'P-'-PA7E************************************************************************T'P-'-PA7E2

  Pri#t o!t t%e sta#ar report %eaer  PER'RM S9BCREP'RTCEA,ER(ZSKELSR01+  9S3N7 SD-L3NSZ SD-PR'7 2

************************************************************************* EN,-'-PA7E************************************************************************EN,-'-PA7E2

************************************************************************* START-'-SELET3'N

************************************************************************START-'-SELET3'N2

* ,e5i#itio# o5 5iels 5or 3EL,-7R'9P e<tract3NSERT: 222 3NT' EA,ER2

************************************************************************* 7ET $ta$************************************************************************* 7ets t%e ta$le $ta$ 5or processi#g @%ile t%e logical ata$ase* is r!##i#g2 Do! ca# aress all t%e 5iels 5rom $ta$ i# t%e* s!$se;!e#t processi#g2 Do! ca# also re5er to 5iels 5rom ta$les* i# t%e logical ata$ase o# t%e access pat% to t%e ta$le $ta$2* ('#l !se5!l @%e# Logical ,ata$ase is accesse $ t%e program+7ET 222

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e of

Page 69: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 69/86

CODING GUIDELINES AND STANDARDS 

************************************************************************* EN,-'-SELET3'N************************************************************************EN,-'-SELET3'N2

  S'RT 222  L''P 222

  AT 3RST  222  EN,AT2

  AT NE)   222  EN,AT2

  AT EN, '  222

  EN,AT2

  AT LAST2  222  EN,AT2

  EN,L''P2

  Pri#t o!t t%e sta#ar report 5ooter  PER'RM S9BCEN,C'CREP'RT(ZSKELSR01+ 9S3N7 SD-L3NSZ2

*&---------------------------------------------------------------------**& orm S9BC 3NSERTCENTR3ES

*&---------------------------------------------------------------------** <<<<<<<<< <<<< <<<< <<< <<<<< <<<< <<<<< <<<< << <<<<<< <<<<*----------------------------------------------------------------------*'RM S9BC3NSERTCENTR3ES 222EN,'RM2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e B of

Page 70: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 70/86

CODING GUIDELINES AND STANDARDS 

:.* (PP%D'B *. 'nteractive (7(P ist !eport

*&---------------------------------------------------------------------*

*& Program Name : ZSKELTP0= **& Title : 3#teractie ABAP List Report **& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/**& ,escriptio# : T%is is a program template 5or 3#teractie ABAP **& List Report2 *

*&---------------------------------------------------------------------**& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/ **& **& 0001 <<.<<.<< <<<<< <<<<< <<<<<<< <<<<<<<< << <<<< **& <<<<<<<<< <<< <<< <<<<<<<< **& **& 000= <<.<<.<< <<<<<< <<< <<<<<< <<<<<< <<<<<: <<<<<<<< *

*& <<<<<<<<< <<<<<< <<<< <<<<> **& <<<<<< <<<< <<<< <<<<> <<<2 **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REP'RT ZSKELTP0=  N' STAN,AR, PA7E EA,3N7  MESSA7E-3, ??  L3NE-'9NT /  L3NE-S3ZE 1=02

*&---------------------------------------------------------------------**& TABLES*&---------------------------------------------------------------------*

TABLES: 22222

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*'NSTANTS: 22222

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*,ATA: 22222

*&---------------------------------------------------------------------*

*& STR9T9RES*&---------------------------------------------------------------------*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 80 of

Page 71: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 71/86

CODING GUIDELINES AND STANDARDS 

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*

*& SELET-'PT3'NS*&---------------------------------------------------------------------*SELET-'PT3'NS: 22222

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*PARAMETERS: 22222

************************************************************************* 3N3T3AL3ZAT3'N************************************************************************* Ee#t @%ic% occ!rs $e5ore t%e selectio# scree# is

* s%o@# to t%e !ser23N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************* Ee#t @%ic% occ!rs eac% time t%e !ser %its e#ter o# t%e selectio#* scree#2

 AT SELET3'N-SREEN2

************************************************************************* T'P-'-PA7E************************************************************************

T'P-'-PA7E2

  Pri#t o!t t%e sta#ar report %eaer  PER'RM S9BCREP'RTCEA,ER(ZSKELSR01+  9S3N7 SD-L3NSZ SD-PR'7 2

************************************************************************* EN,-'-PA7E************************************************************************EN,-'-PA7E2

************************************************************************

* START-'-SELET3'N************************************************************************START-'-SELET3'N2

* ,e5i#itio# o5 5iels 5or 3EL,-7R'9P e<tract3NSERT: 222 3NT' EA,ER2

************************************************************************* 7ET $ta$************************************************************************7ET 222

************************************************************************* EN,-'-SELET3'N************************************************************************

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 81 of

Page 72: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 72/86

CODING GUIDELINES AND STANDARDS 

EN,-'-SELET3'N2

* Pro!ce mai# list report SD-LS3N, F 02  S'RT 222  L''P 222  )R3TE:. 222

* ie speci5ic 5iels @%ic% are o5 importa#ce to t%e li#e2  3,E: 222  EN,L''P2

  Pri#t o!t t%e sta#ar report 5ooter  PER'RM S9BCEN,C'CREP'RT(ZSKELSR01+ 9S3N7 SD-L3NSZ2

************************************************************************* AT P222************************************************************************* Ee#t @%ic% occ!rs @%e# !ser %its a partic!lar P* "e> e2g2 P/2 T%e %ie area a# SD-L3SEL are* a!tomaticall aaila$le2 3t pro!ces a s!$list SD-

* LS3N, F 1-2 PG is a!tomatic a# @ill al@as* ta"e t%e !ser $ac" o#e list leel> (SD-LS3N, - 1+2

 AT P222

************************************************************************* AT 9SER-'MMAN,************************************************************************* Ee#t @%ic% occ!rs @%e# a !ser tpes FL3ST i# t%e 'K* coe2 T%e %ie area a# SD-L3SEL are a!tomaticall* aaila$le2 3t pro!ces a s!$list SD-LS3N, F 1-2* PG is a!tomatic a# @ill al@as ta"e t%e !ser $ac"* o#e list leel> (SD-LS3N, - 1+2

 AT 9SER-'MMAN,2

  ASE SD-9'MM2  )EN L3ST2 22222  EN,ASE2

************************************************************************* AT L3NE-SELET3'N************************************************************************* Ee#t @%ic% occ!rs @%e# t%e !ser places t%e c!rsor* to a speci5ic li#e o# t%e report a# %its e#ter2* T%e %ie area a# SD-L3SEL are a!tomaticall* aaila$le2 3t pro!ces a s!$list SD-LS3N, F 1-2* PG is a!tomatic a# @ill al@as ta"e t%e !ser $ac"* o#e list leel> (SD-LS3N, - 1+2

 AT L3NE-SELET3'N2

*&---------------------------------------------------------------------**& orm S9BC 3NSERTCENTR3ES*&---------------------------------------------------------------------** <<<<<<<<< <<<< <<<< <<< <<<<< <<<< <<<<< <<<< << <<<<<< <<<<*----------------------------------------------------------------------*'RM S9BC3NSERTCENTR3ES 222EN,'RM2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 82 of

Page 73: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 73/86

CODING GUIDELINES AND STANDARDS 

:., (PP%D'B ,. Create a Se3uential Dataset

*&---------------------------------------------------------------------*

*& Program Name : ZSKELTP0G **& Title : reate a Se;!e#tial ,ataset **& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/**& ,escriptio# : T%is is a program template 5or creati#g a **& Se;!e#tial ,ataset2 *

*&---------------------------------------------------------------------**& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/ **& **& 0001 <<.<<.<< <<<<< <<<<< <<<<<<< <<<<<<<< << <<<< **& <<<<<<<<< <<< <<< <<<<<<<< **& **& 000= <<.<<.<< <<<<<< <<< <<<<<< <<<<<< <<<<<: <<<<<<<< *

*& <<<<<<<<< <<<<<< <<<< <<<<> **& <<<<<< <<<< <<<< <<<<> <<<2 **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REP'RT ZSKELTP0G  N' STAN,AR, PA7E EA,3N7  MESSA7E-3, ??  L3NE-'9NT /  L3NE-S3ZE 1=02

*&---------------------------------------------------------------------**& TABLES*&---------------------------------------------------------------------*

TABLES: 22222

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*'NSTANTS: 22222

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*,ATA: 7CP,SNME L3KE 3LENAME-3LEE?TERN2 P%sical ,ataset Name2

*&---------------------------------------------------------------------*

*& STR9T9RES*&---------------------------------------------------------------------*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 86 of

Page 74: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 74/86

CODING GUIDELINES AND STANDARDS 

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*,ATA: BE73N ' TCTAB '9RS 222  EN, ' TCTAB2

*&---------------------------------------------------------------------**& SELET-'PT3'NS*&---------------------------------------------------------------------*SELET-'PT3'NS: 22222

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*PARAMETERS: PCL,SNME L3KE 3LENAME-3LE3NTERN Logical ,ataset Name  ,EA9LT 9ST'MERC3LE2

************************************************************************

* 3N3T3AL3ZAT3'N************************************************************************* Ee#t @%ic% occ!rs $e5ore t%e selectio# scree# is* s%o@# to t%e !ser23N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************* Ee#t @%ic% occ!rs eac% time t%e !ser %its e#ter o# t%e selectio#* scree#2

 AT SELET3'N-SREEN2

  ALL 9NT3'N 3LEC7ETCNAME  E?P'RT3N7  L'73ALC3LENAME F PCL,SNME  3MP'RT3N7  3LECNAME F 7CP,SNAME  E?EPT3'NS  3LECN'TC'9N, F 012

  3 SD-S9BR HI 02*---No p%sical 5ile#ame ca# $e etermi#e 5or &  MESSA7E E01/(M7+ )3T PCL,SNME2  EN,32

************************************************************************* T'P-'-PA7E************************************************************************T'P-'-PA7E2

  Pri#t o!t t%e sta#ar report %eaer  PER'RM S9BCREP'RTCEA,ER(ZSKELSR01+  9S3N7 SD-L3NSZ SD-PR'7 2

************************************************************************* EN,-'-PA7E************************************************************************EN,-'-PA7E2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 83 of

Page 75: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 75/86

CODING GUIDELINES AND STANDARDS 

************************************************************************* START-'-SELET3'N************************************************************************START-'-SELET3'N2

************************************************************************

* 7ET $ta$************************************************************************7ET 22222

************************************************************************* EN,-'-SELET3'N************************************************************************EN,-'-SELET3'N2

  'PEN ,ATASET 7CP,SNME 'R '9TP9T 3N TE?T M',E2  3 SD-S9BR HI 02  2222

  TRANSER TCTAB T' 7CP,SNME2  L'SE ,ATASET 7CP,SNAME2  22222

  Pri#t o!t t%e sta#ar report 5ooter  PER'RM S9BCEN,C'CREP'RT(ZSKELSR01+ 9S3N7 SD-L3NSZ2

*&---------------------------------------------------------------------**& orm S9BC 3NSERTCENTR3ES*&---------------------------------------------------------------------** <<<<<<<<< <<<< <<<< <<< <<<<< <<<< <<<<< <<<< << <<<<<< <<<<*----------------------------------------------------------------------*

'RM S9BC3NSERTCENTR3ES 222EN,'RM2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 85 of

Page 76: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 76/86

CODING GUIDELINES AND STANDARDS 

:.0 (PP%D'B 0. !ead Se3uential Dataset and Create a 7DC Session

*&---------------------------------------------------------------------*

*& Program Name : ZSKELTP04 **& Title : Rea a Se;!e#tial ,ataset am reate a B, sessio#*& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/**& ,escriptio# : T%is is a program template 5or reai#g a **& Se;!e#tial ,ataset a# creati#g a B, sessio#2 *

*&---------------------------------------------------------------------**& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/ **& **& 0001 <<.<<.<< <<<<< <<<<< <<<<<<< <<<<<<<< << <<<< **& <<<<<<<<< <<< <<< <<<<<<<< **& **& 000= <<.<<.<< <<<<<< <<< <<<<<< <<<<<< <<<<<: <<<<<<<< *

*& <<<<<<<<< <<<<<< <<<< <<<<> **& <<<<<< <<<< <<<< <<<<> <<<2 **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REP'RT ZSKELTP04  N' STAN,AR, PA7E EA,3N7  MESSA7E-3, ??  L3NE-'9NT /  L3NE-S3ZE 1=02

*&---------------------------------------------------------------------**& TABLES*&---------------------------------------------------------------------*

TABLES: 22222

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*'NSTANTS: 22222

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*,ATA: 7CP,SNME L3KE 3LENAME-3LEE?TERN2 P%sical ,ataset Name2

*&---------------------------------------------------------------------*

*& STR9T9RES*&---------------------------------------------------------------------*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 8 of

Page 77: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 77/86

CODING GUIDELINES AND STANDARDS 

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*,ATA: BE73N ' TCTAB '9RS 222  EN, ' TCTAB2

,ATA: BE73N ' TCB,,ATA '9RS 102  3NL9,E STR9T9RE B,,ATA2,ATA: EN, ' TCB,,ATA2

*&---------------------------------------------------------------------**& SELET-'PT3'NS*&---------------------------------------------------------------------*SELET-'PT3'NS: 22222

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*

PARAMETERS: PCL,SNME L3KE 3LENAME-3LE3NTERN Logical ,ataset Name  ,EA9LT 9ST'MERC3LE2

************************************************************************* 3N3T3AL3ZAT3'N************************************************************************* Ee#t @%ic% occ!rs $e5ore t%e selectio# scree# is* s%o@# to t%e !ser23N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************

* Ee#t @%ic% occ!rs eac% time t%e !ser %its e#ter o# t%e selectio#* scree#2

 AT SELET3'N-SREEN2

  ALL 9NT3'N 3LEC7ETCNAME  E?P'RT3N7  L'73ALC3LENAME F PCL,SNME  3MP'RT3N7  3LECNAME F 7CP,SNAME  E?EPT3'NS  3LECN'TC'9N, F 012

  3 SD-S9BR HI 02

*---No p%sical 5ile#ame ca# $e etermi#e 5or &  MESSA7E E01/(M7+ )3T PCL,SNME2  EN,32

************************************************************************* T'P-'-PA7E************************************************************************T'P-'-PA7E2

  Pri#t o!t t%e sta#ar report %eaer  PER'RM S9BCREP'RTCEA,ER(ZSKELSR01+  9S3N7 SD-L3NSZ SD-PR'7 2

************************************************************************

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 88 of

Page 78: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 78/86

CODING GUIDELINES AND STANDARDS 

* EN,-'-PA7E************************************************************************EN,-'-PA7E2

************************************************************************* START-'-SELET3'N

************************************************************************START-'-SELET3'N2

  'PEN ,ATASET 7CP,SNME 'R 3NP9T 3N TE?T M',E2  3 SD-S9BR HI 02  2222

  TRANSER 7CP,SNME T' TCTAB2  L'SE ,ATASET 7CP,SNAME2  22222

**35 t%e te<t 5ile is o# prese#tatio# serer (P i#stalle @it% SAP793+**i#stea o5 applicatio# serer ()3NNT+> t%e 5ollo@i#g comma# s%o!l $e

**!se i#stea o5 'PEN ,ATASET :** ALL 9NT3'N 9PL'A, TABLES ,ATACTAB F TCTAB2

*--------------- 'pe# t%e B, Sessio# ---------------*  ALL 9NT3'N B,C'PENC7R'9P  E?P'RT3N7 L3ENT F SD-MAN,T  7R'9P F SESS3'NCNAME sessio# #ame  9SER F SD-9NAME  KEEP F ?2 "eep sessio# a5ter processi#g

  L''P AT TCTAB2*------------------- ,DNPR' ### ---------------------*  PER'RM S9BCB,,DNPR' 9S3N7 ? SAPM<<<< ### 2

  PER'RM S9BCB,,DNPR' 9S3N7 TABL-3EL, L3TERAL

*------------------- ,DNPR' ### ---------------------*  PER'RM S9BCB,,DNPR' 9S3N7 ? SAPM<<<< ### 2  PER'RM S9BCB,,DNPR' 9S3N7 TABL-3EL, TAB-6AR2*----------------------------------------------------*  22222  PER'RM S9BC3NSERTCB,2

  EN,L''P2

************************************************************************* EN,-'-SELET3'N

************************************************************************EN,-'-SELET3'N2

*--------------- lose t%e B, Sessio# -------------*  ALL 9NT3'N B,CL'SEC7R'9P2  22222

  Pri#t o!t t%e sta#ar report 5ooter  PER'RM S9BCEN,C'CREP'RT(ZSKELSR01+ 9S3N7 SD-L3NSZ2

*&---------------------------------------------------------------------**& orm S9BCB,,DNPR'*&---------------------------------------------------------------------** A a li#e to t%e ,DNPR' Ta$le

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 8 of

Page 79: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 79/86

CODING GUIDELINES AND STANDARDS 

*----------------------------------------------------------------------*'RM S9BCB,,DNPR' 9S3N7 BE7 PR7 ,DN L, 6AL2

  LEAR TCB,,ATA2  TCB,,ATA-,DNBE73N F BE72  TCB,,ATA-PR'7RAM F PR72

  TCB,,ATA-,DNPR' F ,DN2  TCB,,ATA-NAM F L,2  TCB,,ATA-6AL F 6AL2  APPEN, TCB,,ATA2

EN,'RM2

*&---------------------------------------------------------------------**& orm S9BC3NSERTCB,*&---------------------------------------------------------------------** A a tra#sactio# to t%e B, sessio# @it% t%e e#tries i# B,,ATA *----------------------------------------------------------------------*'RM S9BC3NSERTCB,2

  ALL 9NT3'N B,C3NSERT  E?P'RT3N7 T',E F T',  TABLES ,DNPR'TAB F TCB,,ATA2  RERES TCB,,ATA2

EN,'RM2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 8B of

Page 80: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 80/86

CODING GUIDELINES AND STANDARDS 

:.8 (PP%D'B 8. C( &!(%S(C&'O% +S'%G &ec#ni3ue

*&---------------------------------------------------------------------**& Program Name : ZSKELTP0 **& Title : ALL TRANSAT3'N 9S3N7 Tec%#i;!e **& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/ **& ,escriptio# : T%is is a program template 5or emo#strati#g *

*& ALL TRANSAT3'N 9S3N7 Tec%#i;!e2 **&---------------------------------------------------------------------**& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/ **& **& 0001 <<.<<.<< <<<<< <<<<< <<<<<<< <<<<<<<< << <<<< **& <<<<<<<<< <<< <<< <<<<<<<< **& *

*& 000= <<.<<.<< <<<<<< <<< <<<<<< <<<<<< <<<<<: <<<<<<<< **& <<<<<<<<< <<<<<< <<<< <<<<> **& <<<<<< <<<< <<<< <<<<> <<<2 **& **** ******* ****** ********************** **&---------------------------------------------------------------------*REP'RT ZSKELTP0  N' STAN,AR, PA7E EA,3N7  MESSA7E-3, ??  L3NE-'9NT /  L3NE-S3ZE 1=02

*&---------------------------------------------------------------------**& TABLES

*&---------------------------------------------------------------------*TABLES: 3N,?> 22222

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*'NSTANTS: 22222

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*,ATA: )CRET9RNC',E L3KE SD-S9BR>  )CMESSA7ECTE?T(1=0+2

*&---------------------------------------------------------------------*

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 0 of

Page 81: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 81/86

CODING GUIDELINES AND STANDARDS 

*& STR9T9RES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*

,ATA: BE73N ' TCB,,ATA '9RS 102  3NL9,E STR9T9RE B,,ATA2,ATA: EN, ' TCB,,ATA2

*&---------------------------------------------------------------------**& SELET-'PT3'NS*&---------------------------------------------------------------------*SELET-'PT3'NS: 22222

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*PARAMETERS: 22222

************************************************************************* 3N3T3AL3ZAT3'N************************************************************************* Ee#t @%ic% occ!rs $e5ore t%e selectio# scree# is* s%o@# to t%e !ser23N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************* Ee#t @%ic% occ!rs eac% time t%e !ser %its e#ter o# t%e selectio#* scree#2

 AT SELET3'N-SREEN2

  ALL 9NT3'N 3LEC7ETCNAME  E?P'RT3N7  L'73ALC3LENAME F PCL,SNME  3MP'RT3N7  3LECNAME F 7CP,SNAME  E?EPT3'NS  3LECN'TC'9N, F 012

  3 SD-S9BR HI 02*---No p%sical 5ile#ame ca# $e etermi#e 5or &  MESSA7E E01/(M7+ )3T PCL,SNME2

  EN,32

************************************************************************* T'P-'-PA7E************************************************************************T'P-'-PA7E2

  Pri#t o!t t%e sta#ar report %eaer  PER'RM S9BCREP'RTCEA,ER(ZSKELSR01+  9S3N7 SD-L3NSZ SD-PR'7 2

************************************************************************* EN,-'-PA7E************************************************************************

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 1 of

Page 82: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 82/86

CODING GUIDELINES AND STANDARDS 

EN,-'-PA7E2

************************************************************************* START-'-SELET3'N************************************************************************START-'-SELET3'N2

  22222

*------------------- ,DNPR' ### ---------------------*  PER'RM S9BCB,,DNPR' 9S3N7 ? SAPM<<<< ### 2  PER'RM S9BCB,,DNPR' 9S3N7 TABL-3EL, L3TERAL

*------------------- ,DNPR' ### ---------------------*  PER'RM S9BCB,,DNPR' 9S3N7 ? SAPM<<<< ### 2  PER'RM S9BCB,,DNPR' 9S3N7 TABL-3EL, TAB-6AR2*----------------------------------------------------*  22222

* ALL TRANSAT3'N  ALL TRANSAT3'N <<<< 9S3N7 TCB,,ATA M',E N 9P,ATE S2

* Message %a#li#g  )CRET9RNC',E F SD-S9BR2

* T%e 5ollo@i#g 5!#ctio# mo!le is a c!stom ro!ti#e* a# ca# $e o$tai#e 5rom SAP America2  ALL 9NT3'N ZZC'RMATCMESSA7E  E?P'RT3N7 MESSA7EC3, F SD-MS73,  MESSA7ECN9MBER F SD-MS7N'  6AR1 F SD-MS761  6AR= F SD-MS76=

  6ARG F SD-MS76G  6AR4 F SD-MS764  3MP'RT3N7 MESSA7ECTE?T F )CMESSA7ECTE?T  E?EPT3'NS N'TC'9N, F 42

  3 SD-S9BR F 42  )CMESSA7ECTE?T F No message te<t 5o!# i# T1002  EN,32

  3 )CRET9RNC',E F 02* At t%is poi#t> ario!s t%i#gs ca# $e o#e to ma"e* t%e process slic"er2 Se# t%e co#5irmatio# or error* to t%e ot%er program ia R2 Store "e al!es a# 

* co#5irmatio# oc!me#t #!m$er or error message i# a#* ATAB ta$le 5or 5!t!re processi#g2  M'6E Tra#sactio# poste T' 222  M'6E )CMESSA7ECTE?T T' 222  M',3D 222  ELSE2  M'6E Tra#sactio# 5aile T' 222  M'6E )CMESSA7ECTE?T T' 222  M',3D 222* 3# t%e ee#t o5 erre tra#sactio#s:* Store t%e i#ter#al ta$le i# t%e 3N,? ata$ase 5or* 5!t!re o#li#e processi#g o5 t%e SAP tra#sactio#2  E?P'RT TCB,,ATA T' 3N,?(22+ 3, 222  EN,32* or create a $atc% i#p!t sessio# 5or 5!t!re

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 2 of

Page 83: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 83/86

CODING GUIDELINES AND STANDARDS 

* processi#g2

  RERES TCB,,ATA2

************************************************************************* EN,-'-SELET3'N

************************************************************************EN,-'-SELET3'N2

  22222

  Pri#t o!t t%e sta#ar report 5ooter  PER'RM S9BCEN,C'CREP'RT(ZSKELSR01+ 9S3N7 SD-L3NSZ2

*&---------------------------------------------------------------------**& orm S9BCB,,DNPR'*&---------------------------------------------------------------------** A a li#e to t%e ,DNPR' Ta$le

*----------------------------------------------------------------------*'RM S9BCB,,DNPR' 9S3N7 BE7 PR7 ,DN L, 6AL2

  LEAR TCB,,ATA2  TCB,,ATA-,DNBE73N F BE72  TCB,,ATA-PR'7RAM F PR72  TCB,,ATA-,DNPR' F ,DN2  TCB,,ATA-NAM F L,2  TCB,,ATA-6AL F 6AL2  APPEN, TCB,,ATA2

EN,'RM2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 6 of

Page 84: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 84/86

CODING GUIDELINES AND STANDARDS 

:.: (PP%D'B :. General Su2routines

*&---------------------------------------------------------------------*

*& Program Name : ZSKELSR01 **& Title : 7e#eral s!$ro!ti#es (report %eaer> 5ooter> etc2+ **& Mo!le Name : S"eleto# Program **& S!$-Mo!le : - **& A!t%or : Keli# S' (P)+ **& reate ,ate : 1.0/.1 **& Logical ,B : No#e **& Program Tpe : Report (s!$ro!ti#e pool+ **& Tra#sport No2 **& S3R. R No2 **& SAP Release : 42/**& ,escriptio# : T%is report co#tai#s s!$-ro!ti#es !se $ ot%er **& reports2 *

*&---------------------------------------------------------------------**& RE63S3'N L'7 **& **& L'78 ,ATE A9T'R ,ESR3PT3'N **& ---- ---- ------ ----------- **& 0000 1.0/. Keli# So 3#itial 3mpleme#tatio# **& orrectio# No2 : N.A **& Tra#sport Re;!est : ,E6K001/J **&---------------------------------------------------------------------*REP'RT ZSKELSR01 N' STAN,AR, PA7E EA,3N72

*&---------------------------------------------------------------------**& TABLES

*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& 'NSTANTS*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& PR'7RAM 6AR3ABLES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& STR9T9RES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& 3NTERNAL TABLES*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& SELET-'PT3'NS*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------**& PARAMETERS*&---------------------------------------------------------------------*

************************************************************************* 3N3T3AL3ZAT3'N

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 3 of

Page 85: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 85/86

CODING GUIDELINES AND STANDARDS 

************************************************************************3N3T3AL3ZAT3'N2

************************************************************************* AT SELET3'N-SREEN************************************************************************

 AT SELET3'N-SREEN2

************************************************************************* T'P-'-PA7E************************************************************************T'P-'-PA7E2

************************************************************************* EN,-'-PA7E************************************************************************EN,-'-PA7E2

************************************************************************

* START-'-SELET3'N************************************************************************START-'-SELET3'N2

************************************************************************* EN,-'-SELET3'N************************************************************************EN,-'-SELET3'N2

*&---------------------------------------------------------------------**& orm S9BCREP'RTCEA,ER *&---------------------------------------------------------------------** )rite sta#ar report %eaer *

*----------------------------------------------------------------------** --I lCli#s : )it% o5 t%e report li#e* --I lCrepi : Report 3,* --I lCescriptio# : ,escriptio# to $e isplae 5or t%e report*----------------------------------------------------------------------*'RM S9BCREP'RTCEA,ER 9S3N7 LCL3NSZ L3KE SD-L3NSZ  LCREP3, L3KE SD-PR'7  LC,ESR3PT3'N TDPE 2  'NSTANTS: CR37TC3N,ENT TDPE 3 6AL9E 1J2  ,ATA: LCTE?T1(=+> LCTE?T=(=+>  LC'SETCL TDPE 3>  LCLEN7T TDPE 32

  STAT3S: LCREPTE?T L3KE TE?TP''L '9RS )3T EA,ER L3NE>  LC3RSTCALL TDPE B''LEAN>  LC'SETCR TDPE 3>  LCEA,ER(=+2

  3 LC3RSTCALL 3S 3N3T3AL2  REA, TE?TP''L LCREP3, 3NT' LCREPTE?T  LAN79A7E SD-LAN792  LC3RSTCALL F N2  EN,3  LC'SETCR F LCL3NSZ - CR37TC3N,ENT2

  'NATENATE Program:(00=+ LCREP3, 3NT' LCTE?T1 SEPARATE, BD SPAE2  LC'SETCL F STRLEN( LCTE?T1 + 12  LCLEN7T F LCL3NSZ - LC'SETCL - CR37TC3N,ENT2

St,tu!: Draft Final -er!&on 1.1 Secur&t*: O.enP,/e 5 of

Page 86: Coding Guidelines and Standards V1.1

7/24/2019 Coding Guidelines and Standards V1.1

http://slidepdf.com/reader/full/coding-guidelines-and-standards-v11 86/86

CODING GUIDELINES AND STANDARDS 

 )R3TE: .1 LCTE?T1>  AT LC'SETCL(LCLEN7T+ TE?T-001 ENTERE,>  AT LC'SETCR ,ate:(00G+> SD-,AT9M2

  'NATENATE SD-SDS3, . SD-MAN,T 3NT' LCTE?T=2  'NATENATE Ss.#t:(00+ LCTE?T= 3NT' LCTE?T1  SEPARATE, BD SPAE2  LC'SETCL F STRLEN( LCTE?T1 + =2  LCLEN7T F LCL3NSZ - LC'SETCL - CR37TC3N,ENT2

  3 LC,ESR3PT3'N 3S 3N3T3AL2  REA, TABLE LCREPTE?T )3T KED 3, F T2  3 SD-S9BR HI 02  REA, TABLE LCREPTE?T )3T KED 3, F R2  EN,32  M'6E LCREPTE?T-ENTRD T' LCEA,ER2  ELSE2

  M'6E LC,ESR3PT3'N T' LCEA,ER2  EN,32

  )R3TE: .1 LCTE?T1>  AT LC'SETCL(LCLEN7T+ LCEA,ER ENTERE,>  AT LC'SETCR Time:(004+> SD-9ZE3T2

  )R3TE: .1(+ 9ser 3,:(00+> SD-9NAME>  AT LC'SETCR Page:(00/+> SD-PA7N'2

  9L3NE .0(LCL3NSZ+2  L''P AT LCREPTE?T )ERE 3, F 2  )R3TE: . LCREPTE?T-ENTRD 'L'R 'LCEA,3N72

  EN,L''P2  3 SD-S9BR F 02  9L3NE .0(LCL3NSZ+2  EN,32

EN,'RM2 S9BCREP'RTCEA,ER 

*&---------------------------------------------------------------------**& orm S9BCEN,C'CREP'RT*&---------------------------------------------------------------------** )rite sta#ar report 5ooter*----------------------------------------------------------------------** --I lCli#s : @it% o5 report li#e

*----------------------------------------------------------------------*'RM S9BCEN,C'CREP'RT 9S3N7 6AL9E(LCL3NSZ+ L3KE SD-L3NSZ2