Core Abap Notes With Programs

May 4, 2017 | Author: vbvrk | Category: N/A
Share Embed Donate


Short Description

Core ABAP...

Description

INDEX…….. 1.WELCOME PROGRAM

1

Z9AMPROGRAM1: REPORT Z9AMPROGRAM1. write 'welcome'.

Z9AMPROGRAM2: REPORT

Z9AMPROGRAM2.

data x type i. "declaration data y type i. data z type i. x = 10. "initialization y = 20. z = x + y. write : ' a + b = ',z. "display

Z9AMPROGRAM3: REPORT

Z9AMPROGRAM3.

data : x type i, y type i,

1|Pa g e

Santosh P

z type i. x = 10. y = 20. z = x + y. write z. write : / 'sum of two numbers is ',z. write :/ 'sum of two numbers is ',z left-justified. write :/ 'sum of two numbers is ',z centered.

Z9AMPROG RAM4: REPORT

Z9AMPROGRAM4.

*parameters x type i. *parameters y type i. parameters : abc type i default 20 , y type i default 10 obligatory . data z type i. z = abc + y. write z.

Z9AMPROGRAM5: REPORT

Z9AMPROGRAM5.

data : x type i value 10, y type i value 20, z type i. z =

x + y.

2|Pa g e

Santosh P

write z. x = 34. y = 44. z = x + y. write / z. constants m type i value 56. write :/ m. *m = 57.

Z9AMPROG RAM6: REPORT

Z9AMPROGRAM6.

data x type i. write x. data y type c. write :/ 'y is ',y. y = 'Gensoft'. write :/ y. data m(10) type c. m = 'Gensoft systems'. write / m. data k type string. k = 'Gensoft systems'. write / k.

Z9AMPROG RAM7: 3|Pa g e

Santosh P

REPORT

Z9AMPROGRAM7.

parameters : x type i, y type i. data r type i. parameters : r1 radiobutton group g1, r2 radiobutton group g1 , r3 radiobutton group g1 default 'X', r4 radiobutton group g1. if r1 = 'X'. r = x + y. write :/ 'sum is ',r. elseif r2 = 'X'. r = x - y. if r >= 0. write :/ 'Difference is ',r. else. write :/ 'Difference is -' no-gap,r no-sign left-justified. endif. elseif r3 = 'X'. r = x * y. write :/ 'Product is ',r. elseif r4 = 'X'. r = x / y. write :/ 'Division is ',r. endif. FIRST SCREEN :ENTER INPUT’S AND SELECT RADIO BUTTON AND PRESS EXECUTE

SECOND SECEND SCREEN :

4|Pa g e

Santosh P

Z9AMPROGRAM8: REPORT

Z9AMPROGRAM8.

parameters : x type i, y type i. data r type i. parameters : r1 r2 r3 r4

as as as as

checkbox, checkbox, checkbox, checkbox.

if r1 = 'X'. r = x + y. write :/ 'sum is ',r. endif. if r2 = 'X'. r = x - y. if r >= 0. write :/ 'Difference is ',r. else. write :/ 'Difference is -' no-gap,r no-sign left-justified. endif. endif. if r3 = 'X'. r = x * y. write :/ 'Product is ',r. endif. if r4 = 'X'. r = x / y. write :/ 'Division is ',r. endif. FIRST SCREEN: ENTER THE VALUES AND AND TICK THE CHECK BOXE’S AND PRESS EXECUTE

5|Pa g e

Santosh P

S ECEND SCREEN: OUTPUT

Z9AMPROGRAM9: REPORT

Z9AMPROGRAM9.

parameters x type i default 7. data : y type i value 1, z type i. while y le 10. if y ne 4. z = x * y. write :/ x,'*',y,'=',z. endif. y = y + 1. endwhile. FIRST SCREEN:

6|Pa g e

Santosh P

SECEND SCREEN: OUTPUT

Z9AMPROGRAM10: REPORT

Z9AMPROGRAM10.

parameters x type i default 7. data : y type i value 1, z type i. while y le 10. if y eq 4. y = y + 1. continue. endif. z = x * y. write :/ x,'*',y,'=',z. y = y + 1. endwhile. FIRST SCREEN:

7|Pa g e

Santosh P

SECEND SCREEN:

Z9AMPROGRAM11: REPORT

Z9AMPROGRAM11.

parameters x type i default 7. data : y type i value 1, z type i. while y le 10. if y eq 4. exit. endif. z = x * y. write :/ x,'*',y,'=',z. y = y + 1. endwhile. write :/ 'end of program'. FIRST SCREEN:

8|Pa g e

Santosh P

SECEND SCREEN:

Z9AMPROGRAM12: REPORT

Z9AMPROGRAM12 no standard page heading.

write :/ 'hello'. exit. write :/ 'welcome'. write :/ 'bye'.

Z9AMPROGRAM13: REPORT

Z9AMPROGRAM13.

data : x type i value 10, y type i. write :/ 'x is ',x, / 'y is ',y.

9|Pa g e

Santosh P

y = x. write :/ / x = 20. write :/ /

'x is ',x, 'y is ',y. 'x is ',x, 'y is ',y.

Z9AMPROGRAM14: REPORT

Z9AMPROGRAM14.

DATA : x type i value 10. field-symbols . = x. PROGRAM WILL BE TERMINATED:THERE IS NO ‘ASIGN’ KEY WORD SO I LEADS TO RUN TIME ERROR.

Z9AMPROGRAM15: REPORT

Z9AMPROGRAM15.

10 | P a g e

Santosh P

data : x type i value 10. field-symbols

.

assign x to . write :/ 'x is ',x, / ' is ',. x = 20. write :/ 'x is ',x, / ' is ',. = 30. write :/ 'x is ',x, / ' is ',. data y type string value 'Gensoft'. assign y to . write :/ '**************'. write :/ 'x is ',x, / ' is ',, / 'y is ',y.

Z9AMPROGRAM16: REPORT data

Z9AMPROGRAM16.

x type d value '13042011'. "DDMMYYYY

11 | P a g e

Santosh P

write :/ x. x = '20110413'. "YYYYMMDD write :/ x. "ddmmyyyy write :/(10) x. "dd.mm.yyyy write :/(10) x using edit mask '__/__/____'. data y type t value '102045'. "HHMMSS write :/ y. "HHMMSS write :/(8) y. "HH:MM:SS write :/(8) y using edit mask '__-__-__'. write :/ 'Date is ',sy-datum, / 'Time is ',sy-uzeit.

Z9AMPROGRAM17: REPORT

Z9AMPROGRAM17.

parameters : x type i. write :/ 'hello'. if x
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF