Download presentation
Presentation is loading. Please wait.
Published byPriscilla Jennings Modified over 9 years ago
1
ABAP/4 Defining Data Defining Data: –Data statement –Parameters statement –Tables statement –Constants statement –Data statement to define field strings –User defined Data types –Type-pools
2
ABAP/4 Defining Data Defining Variables: –Data statement data f1(2) type c. data f2 like f1. data : max_value type I value 100, cur_date type d value ‘19990201’ –Parameters statement Special type of variable that will accept input from user. –Parameters p1(2) type c. –Parameters cur_date type d default ‘19980211’ obligatory.
3
ABAP/4 Defining Data Data types –Character and Numeric Character Data types Data Type Internal Description Default Internal Length Max Internal Length Valid Values Default Initial Value ccharacter165535Any charBlank nNumeric text 1655350-90 ddate8 (fixed)-0-900000000 ttime6 (fixed)-0-9000000 xhexadecimal165535Any
4
ABAP/4 Defining Data Data types –Character and Numeric Numeric Data types Use integers for simple computations, counters, indexes etc Floating point for very large values or many decimal places. Data Type Internal Description Default Internal Length Max Length/ Dec Valid Values Default Initial Value Iinteger4(fixed)- / 0-231 to + 231 0 PPacked decimal 816 / 140-90 FFloating point 822 / 15* -E-307 to 1E308 0.0
5
ABAP/4 Defining Data Defining constants: –Identical to a variable except that its value cannot be changed. –Constants c1(2) type c value ‘AA’. –Constants c2 like c1 value ‘BB’ Defining Field strings: Type of variable, equivalent structure in DDIC but is defined within ABAP program Has global and local visibility. –Data: begin of totals, region(7) value ‘unknown’, debits(15) type p, count type I, end of totals. Totals-debits = 100. Totals-counts = 10.
6
ABAP/4 Defining Data Using Tables statement to define a field string. Has global and external visibility no matter where it is placed in the program. –Tables ztxlfa1. –Ztxlfa1-name1 = ‘Bugsy’. –Ztxlfa1-land1 = ‘US’. User defined types: –Types : dollars(16) type p decimals 2. –Data : petty_cash type dollars, – Pay_outs type dollars, – lump_sums type dollars.
7
ABAP/4 Defining Data Using Type groups (Type-pool) to define types or constants. –Data Dictionary object that contains one or more types or constants statements. –Multiple programs can share a type group.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.