Control Break Events

download Control Break Events

of 46

Transcript of Control Break Events

  • 8/18/2019 Control Break Events

    1/46

    Control Break Statements in SAP ABAP 

    Control break statements are like events inside the loop. There are 5 control break statements in

    ABAP. These are used within loop.(Except O C!A"E O# which can be used outside theloop as well$

    • AT #%&'T E)AT

    • AT E* E)AT

    • AT E) O# E)AT

    • AT +A'T E)AT

    • O C!A"E O#

    Explanation:

    AT FIRST , *ill tri--er at the irst run o the loop.

    AT LAST, *ill tri--er at the last run o the loop.

    The below 3 events are normally used when the table is sorted.

    AT END OF , *hen we use At end or a ield/ it will tri--er whenever there is an0 chan-e in

    an0 o the ields rom the let to that o the particular ield. The tri--er point will be the at the

    last occurrence o the same value or the ield.

    AT NEW, *hen we use At new or a ield/ it will tri--er whenever there is an0 chan-e in an0 o 

    the ields rom the let to that o the particular ield.The tri--er point will be the at theirst occurrence o the new value or the ield.

    ON CHANE OF, On chan-e o it tri--ers onl0 when there is an0 chan-e in the particularield.

    On chan-e o can be used outside the loop too

    Example Pro!ram:

    http://www.newtosap.info/2012/07/control-break-statements-in-sap-abap_45.htmlhttp://www.newtosap.info/2012/07/control-break-statements-in-sap-abap_45.html

  • 8/18/2019 Control Break Events

    2/46

    !ere is an example pro-ram which -ives 0ou the practical understandin- o all control break

    statements.

    Example Pro-ram or Control Break 'tatements

    NOTE, %t is important to note that we need a temporar0 workarea apart rom the workarea usedin loop or the last 1 control break statements. % we directl0 use the workarea o the loop/ then

    we will -et 2222 value and not the output we are expectin-.

    *&---------------------------------------------------------------------*

    *& Report ZAU_CONTROLBREAK 

    *&

    *&---------------------------------------------------------------------*

    *& NEW TO SAP CONTROL BREAK EXAMPLE

    *& http://www!ewto"#p$!%o

    *&

    *&---------------------------------------------------------------------*

    REPORT #'_(o!tro)re#+

     T,PES: BE.N O t0_1#r(2

    1#t!r T,PE 1#r(-1#t!r2wer+" T,PE 1#r(-wer+"2

    EN3 O t0_1#r(

    3ATA: $t_1#r( T,PE STAN3AR3 TABLE O t0_1#r(2

    w#_1#r( T,PE t0_1#r(2

    w#_te1p T,PE t0_1#r(

    SELECT 1#t!r wer+" ROM 1#r( .NTO TABLE $t_1#r( UP TO 45 ROWS W6ERE 1#t!r 7e 85

  • 8/18/2019 Control Break Events

    3/46

    SORT $t_1#r( B, 1#t!r

    .EL3-S,MBOLS : 91#t!r t0pe 1#t!r

    WR.TE:/ ;ULL TABLE;

    LOOP AT $t_1#r( .NTO w#_1#r(

    w#_te1p < w#_1#r(

    WR.TE: / "0-t#$= 2 w#_te1p-1#t!r2 w#_te1p-wer+"EN3LOOP

    WR.TE:/ ;AT .RST AN3 LAST;

    LOOP AT $t_1#r( .NTO w#_1#r(

    w#_te1p < w#_1#r(

    AT .RST

    WR.TE:/ ;$r"t E!tr0;

    WR.TE:/ w#_te1p-1#t!r2 w#_te1p-wer+"

    EN3AT

    AT LAST

    WR.TE:/ ;L#"t E!tr0;

    WR.TE:/ w#_te1p-1#t!r2 w#_te1p-wer+"

    EN3ATEN3LOOP

    WR.TE:/ ;AT EN3 O;

    LOOP AT $t_1#r( .NTO w#_1#r(

    w#_te1p < w#_1#r(

    AT EN3 O 1#t!r

    WR.TE: / "0-t#$= 2 w#_te1p-1#t!r2 w#_te1p-wer+"

    EN3AT

    EN3LOOP

    WR.TE:/ ;AT NEW;

    LOOP AT $t_1#r( .NTO w#_1#r(

    w#_te1p < w#_1#r(

    AT NEW 1#t!r

    WR.TE: / "0-t#$= 2 w#_te1p-1#t!r2 w#_te1p-wer+"

    EN3AT

    EN3LOOP

    WR.TE:/ ;ON C6ANE O;

    LOOP AT $t_1#r( .NTO w#_1#r(

    w#_te1p < w#_1#r(

    ASS.N w#_1#r(-1#t!r TO 91#t!r

    ON C6ANE O w#_1#r(-1#t!rWR.TE: / "0-t#$= 2w#_te1p-1#t!r2 w#_te1p-wer+"

    EN3ON

    EN3LOOP

    Control Break statements

  • 8/18/2019 Control Break Events

    4/46

    Control break statements are statements which are used to control the se3uence o execution o

    statements with in loop.....endloop.

    These statements are executed onl0 with in loop...endloop.

    Co!tro) re#+ "t#te1e!t" #re

    AT FIRST This statement is executed4tri--ered or the irst iteration o loop ('TAB%6 7 8 $.

    AT LAST  This statement is executed4tri--ered or the last iteration o loop.

    AT NEW   This is executed when ever there is a new value on speciied ield.

    AT END OF   This statement is executed whenever the new value ends on

    speciic ield.

    ON CHANGE OF   %t is same as AT E* and is obsolete in ECC 9.:.

    Co!tro) Bre#+ St#te1e!t"

    If my internal table have 3 numeric elds & i want to be grand total for

    each elds (3 elds.)can i used at last statement for totling of these 3

    elds.

    * U"$!7 AT .RST 2 AT NEW2 AT T6E EN3 O 2 AT LAST

    3ATA: BE.N O .TAB OCCURS 52

    4 T,PE .2

    >?@ T,PE C2

    ?45 T,PE N2

    8?4@ T,PE P 3EC.MALS >2

    EN3 O .TAB

    3ATA: SUB_TOT?45 T,PE P 3EC.MALS

    **--4

    .TAB-4 < 4

  • 8/18/2019 Control Break Events

    5/46

    .TAB-> < ;ONE;

    .TAB- < 45

    .TAB-8 < ;455555;

    APPEN3 .TAB

    CLEAR .TAB

    .TAB-4 < 4

    .TAB-> < ;ONE;

    .TAB- < >5

    .TAB-8 < ;>55555;

    APPEN3 .TAB

    CLEAR .TAB

    .TAB-4 < 4

    .TAB-> < ;ONE;

    .TAB- < 5

    .TAB-8 < ;55555;

    APPEN3 .TAB

    CLEAR .TAB

    *-->

    .TAB-4 < >

    .TAB-> < ;TWO;

    .TAB- < 45

    .TAB-8 < ;455555;

    APPEN3 .TAB

    CLEAR .TAB

    .TAB-4 < >

    .TAB-> < ;TWO;

    .TAB- < >5

    .TAB-8 < ;>55555;

    APPEN3 .TAB

  • 8/18/2019 Control Break Events

    6/46

    CLEAR .TAB

    *--

    .TAB-4 <

    .TAB-> < ;T6REE;

    .TAB- < 45

    .TAB-8 < ;455555;

    APPEN3 .TAB

    CLEAR .TAB

    .TAB-4 <

    .TAB-> < ;T6REE;

    .TAB- < >5

    .TAB-8 < ;>55555;

    APPEN3 .TAB

    CLEAR .TAB

    SORT .TAB B, 4

    LOOP AT .TAB

    AT .RST

    WR.TE: / ; MATER.AL 3ETA.LS:;

    UL.NE

    EN3AT

    AT NEW 4

    WR.TE: / ;3ETA.LS O MATER.AL:; COLOR D 2 .TAB-4

    UL.NE

    EN3AT

    WR.TE: / .TAB-42 .TAB->2 .TAB-2 .TAB-8

    SUB_TOT < SUB_TOT .TAB-8

    AT EN3 O 4

    UL.NE

  • 8/18/2019 Control Break Events

    7/46

    WR.TE: / ;SUB TOTAL :; COLOR .NFERSE ON2 SUB_TOT COLOR .NFERSE ON

    CLEAR SUB_TOT

    EN3AT

    AT LAST

    SUMUL.NE

    WR.TE: ;SUM:;2 .TAB-8

    UL.NE

    EN3AT

    EN3LOOP

    Control Break rocessing in !B! Internal "ables

    Continued

    %n AT #%&'T and AT +A'T event blocks the numeric values in the work area contains ;eros.'

  • 8/18/2019 Control Break Events

    8/46

    '>>>>>>>>>>>>>>>>>>>?2 2)ata )eclaration 2 >>>>>>>>>>>>>>>>>>>>?2

    DATA: gwa_sfli T!"E sfli#DATA: g$_sfli T!"E TA%LE OF sfli#

    SELECT & '" TO ( ROWS FRO) sfli INTO TA%LE g$_sfli#

    LOO" AT g$_sfli INTO gwa_sfli#  AT FIRST#  WRITE:* +Flig,$ De$ails+#  WRITE:* +Ai-line C.de+ COLOR (/01 +C.nne2$i.n N.#+ COLOR (/  34 +Dea-$5-e Ci$6+ COLOR (/ 11 +A-i7al Ci$6+ COLOR (/  (8 +Dis$an2e+ COLOR (#  'LINE#  ENDAT#

    O C!A"E O# -wa@splicarrid. *&%TE,4 -wa@splicarrid/ , ew Airline.

  • 8/18/2019 Control Break Events

    9/46

    Below table summari;es the dierences between AT E* and O C!A"E O# statements.

    AT NEW ON CHANE OF

    %t can be used onl0 in AT+OOP statement.

    %t can be used in an0 loop like'E+ECT/ )O etc..

    Onl0 one control ield can be

    used.

    =ultiple control ields

    separated b0 O& can be used.

    AT E* is tri--ered when aield let to control level

    chan-es.

    O C!A"E O# is nottri--ered when a ield let to

    control level chan-es.

    alues in the ields to theri-ht o control level containsasterisks and ;eros.

    alues in the ields to theri-ht o control level containsori-inal values.

    E+'E addition cannot be

    used.

    E+'E addition can be used.

    Chan-es to work area with AT E* will be lost.

    Chan-es to work area withO C!A"E O# will not be

    lost.

    Control Break #tatements in #! !B!Control break events are used to control the se3uence data low inside the loops in ABAP.

    +ist o control break events in ABAP,

    8$ AT #%&'T

  • 8/18/2019 Control Break Events

    10/46

    D$ AT E*

    1$ AT E) O#

    $ AT +A'T

    5$ '>>>>>> E) AT.

  • 8/18/2019 Control Break Events

    11/46

    AT LAST

    %t is the loop event. %t tri--ers in the last loop operation

    >>>>>>>>>>>>>>>>>>>>>>2

    2F

    2F

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    &EPO&T GCEET' O 'TA)A&) PA"E !EA)%".

    244 Tables declaration.

    TAB+E' marc.

  • 8/18/2019 Control Break Events

    12/46

    244T0pes declaration or t0@marc.

    TPE' , BE"% O# t0@marc/

    matnr TPE matnr/

    werks TPE werks@d/

     pstat TPE pstat@d/

    lvorm TPE lvowk/

     pli; TPE pli;/

    E) O# t0@marc.

    244T0pes declaration or t0@marc8.

    TPE' , BE"% O# t0@marc8/

    werks TPE werks@d/

     pstat TPE pstat@d/

    lvorm TPE lvowk/

     pli; TPE pli;/matnr TPE matnr/

    E) O# t0@marc8.

    244%nternal table declaration.

    )ATA , lt@marc TPE TAB+E O# t0@marc/

    lt@marc8 TPE TAB+E O# t0@marc8.

    244*orkarea declaration.

    )ATA , wa@marc TPE t0@marc/

    wa@marc8 TPE t0@marc8.

    244selection screen desi-n.

    'E+ECTOPT%O' , s@matnr #O& marcmatnr.

    244&etrive the data rom mara.

    'E+ECT matnr werks pstat lvorm pli;

    #&O= marc

    %TO TAB+E lt@marc

    *!E&E matnr % s@matnr.

    %# s0subrc EH :.

    244populatin- data into inal internal table.

    +OOP AT lt@marc %TO wa@marc.

    22222 wa@marc8matnr 7 wa@marcmatnr.

    22222 wa@marc8werks 7 wa@marcwerks.

    22222 wa@marc8pstat 7 wa@marcpstat.

  • 8/18/2019 Control Break Events

    13/46

    22222 wa@marc8lvorm 7 wa@marclvorm.

    22222 wa@marc8pli; 7 wa@marcpli;.

    =OECO&&E'PO)%" wa@marc TO wa@marc8.

    APPE) wa@marc8 TO lt@marc8.

    C+EA& wa@marc8.

    E)+OOP.

    E)%#.

    244 sort b0 speciic ield

    'O&T lt@marc8 B pstat.

    222222244)ispla0 output.

    222222+OOP AT lt@marc8 %TO wa@marc8.

    222222 *&%TE , 4 wa@marc8matnr/wa@marc8werks/wa@marc8pstat/wa@marc8

    lvorm/wa@marc8pli;.

    222222E)+OOP.

    244Appl0 the control break events.

    +OOP AT lt@marc8 %TO wa@marc8.

    244AT #%&'T.

    AT #%&'T.

    *&%TE , 4 P+AT )ATA.

  • 8/18/2019 Control Break Events

    14/46

    244AT E) O#.

    AT E) O# pstat.

    sum .

    write , 41: subtotal/ wa@marc8pli;.

    E)AT.

    244AT +A'T.

    AT +A'T.

    '

  • 8/18/2019 Control Break Events

    15/46

    Creating ushbuttons on #election #creenRe'&irement:

    Create 1 input text iles usin- parameters statement.

    Created pushbuttons and name it as Add/ 'ub/ =ul and )iv as shown below.

    #or example i user clicks on A(( button then % want displa0 addition o P)*al&e+ and P)*al&e,

    in P)Res&lt-

    % user clicks on S&. button then % want displa0 subtraction o P)*al&e+ and P)*al&e, in

    P)Res&lt-

  • 8/18/2019 Control Break Events

    16/46

    % user clicks on =ul button then % want displa0 multiplication o P)*al&e+ and P)*al&e, in

    P)Res&lt-

    % user clicks on )iv button then % want displa0 )ivision o P)*al&e+ and P)*al&e, in P)Res&lt-

    Step +: "o to 'E1J

    create a pro-ram (Pro-ram name starts must with G or $.

    Step ,: Cop0 and paste the below code in 0our pro-ram.

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    2F &eport GP

  • 8/18/2019 Control Break Events

    17/46

    'E+ECT%O'C&EE P

  • 8/18/2019 Control Break Events

    18/46

    Case /: Provide

    P)*al&e+ and P)*al&e, and click on %$L button then 0ou will -et multiplication o P)*al&e+ 

    and P)*al&e, in P)Res&lt as shown below.

    Case 0: Provide

    P)*al&e+ and P)*al&e, and click on DI1 button then 0ou will -et division o P)*al&e+ and

    P)*al&e, in P)Res&lt as shown below.

  • 8/18/2019 Control Break Events

    19/46

    $ow to Create "ransaction Code for "able %aintenance

    enerator in #!

    Ta.le %aintenan2e enerator :

    Table =aintenance "enerator is a user interace tool which is used to customi;e the tables

    created b0 end users and can be chan-ed as re3uired/ such as 0ou can insert a data into the table/

    deletin- an entr0 rom the table/ updatin- an entr0 o table.

    Prere'&isite to 2reate T%:

    To make this eature works/ 0ou should select Data Bro3ser4Ta.le 1ie3 %aint asDispla54maintenan2e allo3 in the Deli*er5 an( %aintenan2e ta. while creatin- the database

    table as shown below.

    SE6/ is a transaction code to create Transaction code or table maintenance -enerator.

    #ollow the below steps to create transaction code or table maintenance -enerator.

    Step+: "o to 'EM1 Transaction code and Provide Transaction code ame ('tarts *ith G or $

    and Click On Create.

  • 8/18/2019 Control Break Events

    20/46

    Step

    ,: Enter shot text and select Transaction with Parameters (Parameter Transaction$ &adio button

    and click on enter.

    Step /: Below screen is tri--er.

  • 8/18/2019 Control Break Events

    21/46

    Step 0: Enter Transaction as N'=1: and select skip initial s2reen check box.

    )o the chan-es as shown below and click on save button.

  • 8/18/2019 Control Break Events

    22/46

    Step 7: Enter the packa-e name and click on save.

  • 8/18/2019 Control Break Events

    23/46

    Below messa-e will

    appear at the status bar.

    O$TP$T:

    "o to the Transaction GT="

     #ollowin- screen will appear.

  • 8/18/2019 Control Break Events

    24/46

    Click On Ne3 Entries 

    To Create new records.

    Enter ew entries.

    Click on save.

    "o to Table Contents and check 0our entries.

    thats it.

  • 8/18/2019 Control Break Events

    25/46

    'ynamic selection screen in #! !B!

    Re'&irement:

    Create a selection screen with D 'electoptions (=aterial umber/ 'ales Order umber$ and Dradio buttons (=aterial )ata/ 'ales )ata$ as shown.

    Case +:  % % select =aterial )ata radio button then 'ales Order umber input iled will be

    disable as shown below.

    Case ,:  % % select 'ales )ata radio button then % =aterial umber input iled will be disable as

    shown below.

    Note: B0 deault select the material radio button and keep Sales or(er n&m.er selection screen

    in disable mode.

    Step +: "o to 'E1J create a pro-ram (Pro-ram name starts must with G or $.

    Step ,: Cop0 and paste the below code in 0our pro-ram.

  • 8/18/2019 Control Break Events

    26/46

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    2F &eport G&EPO&T@:8

    2F

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    2F

    2F

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    &EPO&T G&EPO&T@:8 no standard pa-e headin-.

    244Tables declaration

    tables , mara/vbak.

    244T0pes declaration or =A&A

    t0pes , be-in o t0@mara/

    matnr t0pe matnr/

    E&')A TPE E&')A/

    E&A= TPE E&A=/

    +AE)A TPE +AE)A/

    AEA= TPE AEA=/

    end o t0@mara.

    244T0pes declaration or BAI 

    t0pes , be-in o t0@vbak/

    BE+ TPE BE+@A/E&)AT TPE E&)AT/

    E&GET TPE E&GET/

    end o t0@vbak.

    244%nternal table declaration

    data , lt@mara t0pe table o t0@mara/

    lt@vbak t0pe table o t0@vbak.

    244*ork area declaration

    data , wa@mara t0pe t0@mara/wa@vbak t0pe t0@vbak.

    244'election screen desi-n

    'E+ECT%O'C&EE BE"% O# B+OCI blk8 *%T! #&A=E T%T+E texts:D.

    selectoptions,s@matnr or maramatnr modi id 'C8/

    s@vbeln or vbakvbeln modi id 'CD.

  • 8/18/2019 Control Break Events

    27/46

    'E+ECT%O'C&EE E) O# B+OCI blk8.

    2244Check Boxes )esi-n

    2 'E+ECT%O'C&EE BE"% O# +%E.

    2 'E+ECT%O'C&EE PO'%T%O 8:.

    2 PA&A=ETE&', p@chk8 A' C!ECIBO6.

    2 'E+ECT%O'C&EE CO==ET 81(85$ textcb8.

    2 PA&A=ETE&', p@chkD A' C!ECIBO6.

    2 'E+ECT%O'C&EE CO==ET 1D(85$ textcbD.

    2 'E+ECT%O'C&EE End o +%E.

    244&adio button desi-n

    'E+ECT%O'C&EE BE"% O# B+OCI blkD *%T! #&A=E T%T+E texts:8.

    244&adio buttons desi-n

    selectionscreen be-in o line.

     parameters, p@rad8 radiobutton -roup -rp8 usercommand test.selectionscreen comment 85(85$ text:8: or ield p@rad8.

     parameters, p@radD radiobutton -roup -rp8.

    selectionscreen comment 15(85$ text:88 or ield p@radD.

    selectionscreen end o line.

    'E+ECT%O'C&EE E) O# B+OCI blkD.

    244validatin- selection screen

    AT 'E+ECT%O'C&EE O

  • 8/18/2019 Control Break Events

    28/46

    startoselection.

    244&etrivin- data rom =A&A

    i p@rad8 e3 6.

    i s@matnr is not initial.

    select matnr ersda ernam laeda aenam

    rom mara

    into table lt@mara

    where matnr in s@matnr.

    else.

    messa-e Enter material number t0pe %.

    endi.

    i lt@mara is not initial.

    244)ispla0in- output

    loop at lt@mara into wa@mara.

    write ,4 wa@maramatnr/ wa@maraersda/wa@maraernam/ wa@maralaeda/[email protected].

    else.

    messa-e O )ATA t0pe %.

    endi.

    elsei p@radD e3 6.

    i s@vbeln is not initial.

    select vbeln erdat er;et

    rom vbak 

    into table lt@vbak 

    where vbeln in [email protected].

    messa-e Enter sales order number t0pe %.

    endi.

    i lt@vbak is not initial.

    244)ispla0in- output

    loop at lt@vbak into wa@vbak.

    write ,4 wa@vbakvbeln/ wa@vbakerdat/wa@vbaker;et.

    endloop.

    else.

    messa-e O )ATA t0pe %.

    endi.

    endi.

    O$TP$T:

    'ave 0our and active 0our pro-ram and press #J button to execute.

  • 8/18/2019 Control Break Events

    29/46

    B0 deault material radio button is selected and Sales or(er n&m.er selection screen is in

    disable mode.

    Case +: % 0ou want to retrieve the sales data then select Sales Ra(io .&tton- I 0ou select the

    sales radio button then automaticall0 %aterial n&m.er ield -ets disable.

    Enter the 'ales order number and click on execute button (#J$ to retrieve sales data.

    Case ,: % 0ou want to retrieve the material data then select the %aterial (ata radio button. %

    0ou select the =aterial radio button then automaticall0 Sales n&m.er ield -ets disable.

    Enter the =aterial number and click on execute Button(#J$ to retrieve the material data.

    "able %aintenance without using # and #3*

    "ransaction Codes

  • 8/18/2019 Control Break Events

    30/46

    Table =aintenance "enerator is a user interace tool which is used to customi;e the tables

    created b0 end users and can be chan-ed as re3uired/ such as 0ou can insert a data into the table/

    deletin- an entr0 rom the table/ updatin- an entr0 o table.

    %n ABAP we can maintain table entries usin- '=1: or 'E88 Transaction codes or the tables

    havin- T="/ *e can also archive this unctionalit0 usin- 1IEW)%AINTENANCE)CALL

    #unction =odule.

    Prere'&isite, eed a database table with table maintenance -enerator created in 'E88.

    Table =aintenance usin- 1IEW)%AINTENANCE)CALL unction module.

    Step +: "o to 'E 1 transaction code and enter #unction =odule ame

    1IEW)%AINTENANCE)CALL-

    Step

    ,: Click on Execute button.

  • 8/18/2019 Control Break Events

    31/46

     S

    tep /: %t will open the ollowin- screen. #ill the A2tion and 1ie3 Name (Table ame$ and click

    on execute.

    Step 0: %t will open ollowin- screen/ Click on (ispla5 89 Can!e To Enter the ew &ecords.

  • 8/18/2019 Control Break Events

    32/46

    Enter the new records and click on save button to store data in 0our table.

    Tis is onl5 possi.le 3en en entr5 exists in T1DIR;or an5 *ie3 maintaine(

  • 8/18/2019 Control Break Events

    33/46

    • Like/ 0ou assi-n the datat0pe o another obQect to the declarin- data obQect. The data t0pe

    is reerenced indirectl0.

    • %t will allocate memor0 immediatel0.

    • %t is when data obQect link with the other data obQect.

    • Like reers to existin- datat0pe o data obQect

    +ist of "ransaction Codes in #! !B!

    Transa2tion 2o(e:

    Transaction code is the collection o the screens where we can develop our obQect/ sap provided

    their own transaction code or each and ever0 concept those are called standard transaction codes

    .

    % 0ou want we can create 0our own transaction code those are called as custom transaction codes

    %n 'AP there are more than 885D:: standard Tcodes are there.

    +ist o Transaction codes used in ABAP,

    'E:8 ? Transport Or-ani;er (Extended view$

    'E:1 ? Transport Or-ani;er Tools

    'E:M ? Transport Or-ani;er 

    'E8: ? Transport Or-ani;er 

    'E88 ? ABAP4 )ictionar0

    'E8D ? ABAP4 )ictionar0 )ispla0

    'E81 ?)ictionar0 Technical 'ettin-s

    'E8 ? ABAP4 )ictionar0, )atabase

  • 8/18/2019 Control Break Events

    34/46

    'E89 ? )ata Browser , %nitial 'creen

    'E89 ? "eneral Table )ispla0

    'E8 ? "eneral Table )ispla0

    'E8J ? BA)% Builder ,%nitial 'creen #or )einitions

    'E8M ? BA)% Builder , %nitial 'creen #or %mplementations

    'ED8 ? Packa-e Builder, %nitial 'creen

    'ED ? Class Builder , %nitial 'creen

    'EDM ? Application Packets

    'E1: ? &un Time Anal0sis , %nitial 'creen

    'E1D ? 'AP

    'E11 ? Context Builder , %nitial 'creen

    'E15 ? =aintain )ialo- =odules

    'E19 ? +o-ical )atabase Builder 

    'E1 ? #unction Builder , %nitial 'creen

    'E1J ?ABAP Editor , %nitial 'creen

    'E1M ? ABAP 'plitscreen Editor , %nitial 'creen

    'E8 ? =enu Painter , %nitial 'creen

    'E1 ? Area =enu =aintenance

    'E58 ? 'creen Painter, %nitial 'creen

    'E5 ? "enerate table =aintenance )ialo- , %nitial Table4 iew 'creen

    'E55 ? "enerate table =aintenance )ialo- , %nitial Table4 iew 'creen

    'E59 ? "enerate table =aintenance )ialo- , %nitial Table4 iew 'creen

  • 8/18/2019 Control Break Events

    35/46

    'E5 ? "enerate table =aintenance )ialo- , %nitial Table4 iew 'creen

    'E98 ? )ocument =aintenance ,

    'E9D ?'hort Text Conversion ? Activation

    'E91 ?Translation

    'E8 ? #orm Painter 

    'ED ? 't0le , &e3uest

    'E1 ? 'AP 'cript #ont =aintenance , %nitial 'creen

    'E ? 'AP 'cript #ormat Conversion

    'E5 ? 'AP 'cript 'ettin-s

    'E9 ? 'AP 'cript #rom Translation

    'E ? 'AP 'cript 't0le Conversion

    'EJ ?Administration #or "raphics

    'EJ: ? ObQect avi-ator 

    'EJ8F'EJD ? Application !ierarch0 , )ispla0

    'EJ1 ?)ispla0 &euse +ibrar0

    'EJ ? ObQect avi-ator 

    'EJ5 ? ObQect avi-ator 

    'EM: ? ObQect avi-ator 

    'EM8 ?=essa-e =aintenance , %nitial 'creen

    'EMD ? =aintain s0stem lo- messa-es

    'EM1 ?Transaction Code Creation

    '=8D ? +ock table entries (unlock locked tables$

  • 8/18/2019 Control Break Events

    36/46

    '=: ?

  • 8/18/2019 Control Break Events

    37/46

    'P:D ? Output Control , 'pool &e3uest +ist

    'O8: ? 'tandard Text

    A+88 ? Application server path

    *E)% ? E)% =enu. %)OC and E)% base

    *E:D ? %)OC list

    *E: ? %)OC statistics

    *E18 ? 'e-ment creation

    *E1: ? %)OC t0pe creation

    *EJ8 ? To create messa-e t0pe

    *EJD assi-n the messa-e t0pe to %)OC t0pes

    *E D: ? Partner proile

    *ED8 ? Port creation

    'T:8 ? '0stem trace

    'T88 ? Error lo- iles

    '=D8 ? '0stem lo-

    '=81 ?

  • 8/18/2019 Control Break Events

    38/46

    '%CI ? %nstallation rheck 

    '+% ? Extended rheck 

     'p:8 ? 'pool rontrol

    'p:D ? )ispla0 output re3uest

    C"1 ? Transer ile rom application server to ront end

    C"1G ? transer ile rom ront end to application server 

    '*O8 ? Business obQect builder 

    '*OD ? Bussiness obQect repositor0 browser 

    'is,lay a Column !s a ushbutton in the !+- e,ort

    /ut,ut

    )#re" Tw$tter 4 #(eoo+ >@ oo7)e 5 L$!+eG.! 5 E1#$) -- P$! .t Sh#re 5

    Re'&irement:

    • 3$"p)#0 p#rt$(')#r (o)'1! G#t# #" # P'"h'tto! $! the ALF Report O'tp't ?.!

    th$" e=#1p)e . #1 G$"p)#0$!7 (o1p#!0 (oGe?BUKRSG#t# #" # P'"h'tto!

    • Whe! the '"er ()$(+" o! p'"h'tto! G$"p)#0 the He!Gor?C#)) XK5 T(oGeGet#$)" $! pop'p "(ree!

     

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    2F &eport GA+@B

  • 8/18/2019 Control Break Events

    39/46

    2F

    2F>>>>>>>>>>>>>>>>>>>>>>>2

    &EPO&T GA+@B

  • 8/18/2019 Control Break Events

    40/46

    es@row@no

    sender.

    E)C+A''. Slc@eventhandler )E#%%T%O

    2>>>>>>>>>>>>>>>>>>>>>>>22 C+A'' lc@eventhandler %=P+E=ETAT%O

    2>>>>>>>>>>>>>>>>>>>>>>>2

    2

    2>>>>>>>>>>>>>>>>>>>>>>>2

    C+A'' lc@eventhandler %=P+E=ETAT%O.

    =ET!O) button@click@event.

    2 deine local data

    )ATA,

    ls@lb8 TPE lb8/

    ls@col@id TPE lvc@s@col.

    &EA) TAB+E lt@lb8 %TO ls@lb8 %)E6 es@row@norow@id.

    C!ECI ( ls@lb8linr %' OT %%T%A+ $.

    'ET PA&A=ETE& %) +%# #%E+) ls@lb8linr.

    'ET PA&A=ETE& %) B

  • 8/18/2019 Control Break Events

    41/46

    22Click on enter 

    C&EATE OBRECT +&@COTA%E& 

    E6PO&T%"

     parent 7 cl@-ui@container7screen:

    ratio 7 M:

    E6CEPT%O'

    CT+@E&&O& 7 8

    CT+@''TE=@E&&O& 7 D

    C&EATE@E&&O& 7 1

    +%#ET%=E@E&&O& 7

    +%#ET%=E@)P&O@)P&O@+%I 7 5

    others 7 9.

    %# ''

  • 8/18/2019 Control Break Events

    42/46

    244 Populateieldcatalo- and set button or ield B>>>>>>>>>>>>>>>>>>>>>>2

    2F =odule 'TAT

  • 8/18/2019 Control Break Events

    43/46

    'ET P#'TAT>>>>>>>>>>>>>>>>>>>2

    2F =odule >>>>>>>>>>>>>>>>>>>>>2

    2F #orm B

  • 8/18/2019 Control Break Events

    44/46

    wa@iledcatseltext 7 Compan0 Code.

    APPE) wa@iledcat TO +T@#%E+)CAT.

    C+EA& wa@iledcat.

    wa@iledcatcol@pos 7 1.

    wa@iledcat#%E+)A=E 7 PE&&.

    wa@iledcatoutputlen 7 8:.

    wa@iledcatseltext 7 Personnel umber.

    APPE) wa@iledcat TO +T@#%E+)CAT.

    C+EA& wa@iledcat.

    wa@iledcatcol@pos 7 .

    wa@iledcat#%E+)A=E 7 E&A=.

    wa@iledcatoutputlen 7 85.

    wa@iledcatseltext 7 who Created the ObQect.

    APPE) wa@iledcat TO +T@#%E+)CAT.

    C+EA& wa@iledcat.

    244set button or ield B

  • 8/18/2019 Control Break Events

    45/46

    List o< Transa2tion Co(es in SAP ABAP-

    Di@ oo7)e 5 L$!+eG.! 5 E1#$) -- P$! .t Sh#re 5

    ABAP T'tor$#)"2 ALF Report"2 OO ABAP2 OO AFL2 SAP2 SAP ABAP T'tor$#)"2 "#p ##p

    t'tor$#)" %or e7$!!er" 

    Re)#teG Po"t"

    3$ere!(e Betwee! M#$! W$!Gow #!G F#r$#)e W$!Gow $! SAP

    3$"p)#0 PO A!G ooG" Re(e$pt 3et#$)" A7#$!"t P'r(h#"e Re'$"$t$o! SAP Report"

    B'"$!e"" App)$(#t$o! Pro7r#11$!7 .!ter%#(e .!troG'(t$o! BAP.

    .!ter#(t$He report" $! SAP ABAP

    Enter Your Enter Your 

    http://sapsimplified.com/tcodes/list-of-tcodes-in-sap-abap/http://sapsimplified.com/sap-abap/difference-between-type-and-like-in-sap-abap/http://sapsimplified.com/sap-abap/pushbuttons-on-selection-screenhttp://sapsimplified.com/tag/abap-tutorials/http://sapsimplified.com/tag/alv-reports/http://sapsimplified.com/tag/oo-abap-2/http://sapsimplified.com/tag/oo-avl/http://sapsimplified.com/tag/sap/http://sapsimplified.com/tag/sap-abap-tutorials/http://sapsimplified.com/tag/sap-abap-tutorials-for-beginners/http://sapsimplified.com/tag/sap-abap-tutorials-for-beginners/http://sapsimplified.com/sap-abap/main-window-vs-variable-window/http://sapsimplified.com/sap-abap/display-po-goods-reciept-details-sap-reports/http://sapsimplified.com/sap-abap/bapi-sap-abap/http://sapsimplified.com/sap-abap/interactive-reports-in-sap-abap/http://sapsimplified.com/tcodes/list-of-tcodes-in-sap-abap/http://sapsimplified.com/sap-abap/difference-between-type-and-like-in-sap-abap/http://sapsimplified.com/sap-abap/pushbuttons-on-selection-screenhttp://sapsimplified.com/tag/abap-tutorials/http://sapsimplified.com/tag/alv-reports/http://sapsimplified.com/tag/oo-abap-2/http://sapsimplified.com/tag/oo-avl/http://sapsimplified.com/tag/sap/http://sapsimplified.com/tag/sap-abap-tutorials/http://sapsimplified.com/tag/sap-abap-tutorials-for-beginners/http://sapsimplified.com/tag/sap-abap-tutorials-for-beginners/http://sapsimplified.com/sap-abap/main-window-vs-variable-window/http://sapsimplified.com/sap-abap/display-po-goods-reciept-details-sap-reports/http://sapsimplified.com/sap-abap/bapi-sap-abap/http://sapsimplified.com/sap-abap/interactive-reports-in-sap-abap/

  • 8/18/2019 Control Break Events

    46/46

    SAP ABAP report w$th (he(+o= to 3ow!)o#G "e)e(teG re(orG" #t R'!t$1e

    http://sapsimplified.com/sap-abap/checkboxes-sap-abap-reports/http://sapsimplified.com/sap-abap/checkboxes-sap-abap-reports/