What is a collect statement and how it is different from append ?
ANS:-
If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.
Dependency Syntax: General Rules in SAP
Operators
Operators
Use in Dependencies
AND
Two statements that are both either true or not true are linked with AND.
Length = 300 and Width = 200
OR
Two statements of which at least one is either true or not true are linked with OR.
Color = ‘red’ or Basic_material = ‘wood’
NOT
You can negate one or more expressions by using NOT.
NOT (Color = ‘blue’)
NOT (Color = ‘red’ and Basic_material = ‘wood’)
IF
Conditions in actions and procedures start with IF.
Color = 'red' if Model = ‘A’
Special Features
Lists
In lists, the individual elements are always separated by commas.
COLOR = 'RED' IF MODEL = 'A',
COLOR = 'BLUE' IF MODEL = 'B',
COLOR = 'GREEN' IF MODEL = 'C',
Case sensitivity
In characteristic names, object variables, and operators, there is no distinction between upper case and lower case letters.
Concatenation
LC
All letters are converted to lower case.
Leather_saddle = LC('Alpha')
= 'a'
UC
All letters are converted to upper case.
Leather_saddle = U C('Alpha')
= 'A'
This function is important if the assigned characteristic does not allow lower case, but the assigned expression may contain lower-case letters.
||
The string is cut off at the maximum number of 30 characters.
Leather_saddle = Alpha || Beta
= 'AB'
List of Built-In Conditions
Expression
Implied Condition
SPECIFIED
Characteristic has a value:
SPECIFIED COLOR
See Built-In Condition SPECIFIED
IN
One of these values must be set:
COLOR IN (‘red’, ‘green’, ‘blue’)
See Built-In Condition IN
TYPE_OF
Only for certain objects:
TYPE_OF ($ROOT, (Material) (300) (NR = 'U91’))
See Built-In Condition TYPE_OF
PART_OF
The object is a component of a BOM
(only in constraints).
See Constraints: Entering Conditions
SUBPART_OF
The object is a component of an assembly that is part of the BOM of a configurable material
(only in constraints).
WRITE TO sap abap keyword syntax and description
Assigns strings.
Syntax
WRITE TO [].
Converts the contents of the data object to type C and assigns the resulting string to the
variable . You can use the same formatting options available in the WRITE statement.
WRITE sap abap keyword syntax and description
Creates list output.
Syntax
WRITE [AT [/][][()]] [AS CHECKBOX|SYMBOL|ICON|LINE]
[QUICKINFO ].
[]
The contents of the field are formatted according to their data type and displayed on the list.
The additions before the field allow you to specify a line break, the starting position, and the
length of the field. The additions after the field allow you to display checkboxes, symbols, icons,
and lines. The addition can contain various other formatting options. The QUICKINFO
addition allows you to assign a quickinfo to the field.
WINDOW sap abap keyword syntax and description
Displays a list as a modal dialog box.
Syntax
WINDOW STARTING AT [ENDING AT ].
Can only be used in list processing. The current detail list is displayed as a modal dialog box.
The top left-hand corner of the window is positioned at column and line . The bottom
right-hand corner is positioned at column and line (if specified).
WHILE sap abap keyword syntax and description
Introduces a loop.
Syntax
WHILE [VARY FROM NEXT ].
Introduces a statement block that is concluded with ENDWHILE. The statement block between
WHILE and ENDWHILE is repeated for as long as the expression is true, or until a
termination statement such as CHECK or EXIT occurs. The VARY addition allows you to process
fields that are a uniform distance apart within memory.
WHEN sap abap keyword syntax and description
Introduces a statement block in a CASE control structure
Syntax
WHEN [OR OR...] | OTHERS.
The statement block after a WHEN statement is executed if the contents of the field in the
CASE statement are the same as those of one of the fields
. Processing then resumes after the ENDCASE statement. The WHEN OTHERS statement
block is executed if the contents of do not correspond to any of the fields .
UPDATE sap abap keyword syntax and description
Modifies lines in database tables.
Syntax
UPDATE SET =
| = +
| = - [WHERE ].
Sets the value in to , increases it by , or decreases it by for all selected lines. The
WHERE addition determines the lines that are updated. If you omit the WHERE addition, all lines
are updated.
Syntax
UPDATE FROM .
UPDATE FROM TABLE .
Overwrites the line with the same primary key as with the contents of , or all lines with
the same primary key as a line in the internal table with the corresponding line of itab. The
work area or the lines of the table must have at least the same length and the same
alignment as the line structure of the database table.
UNPACK sap abap keyword syntax and description
Converts variables from type P to type C.
Syntax
UNPACK TO .
Unpacks the packed field and places it in the string with leading zeros. The opposite of
PACK.
ULINE sap abap keyword syntax and description
Places a horizontal line on the output list.
Syntax
ULINE [AT [/][][()]].
Without additions, generates a new line on the current list and fills it with a horizontal line. The
additions allow you to insert a line break and specify the starting position and length of the line.
TYPES for Aggregate Types sap abap keyword syntax and description
Defines aggregated types.
Syntax
TYPES: BEGIN OF ,
...
...,
...
END OF .
Combines the data types to form the structure . You can address the individual
components of a structure in a program using a hyphen between the structure name and the
component name as follows: -.
Syntax
TYPES TYPE|LIKE OF [WITH ].
Defines the local data type in the program as an internal table with the access type
, the line type , and the key
TYPES for Simple Field Types sap abap keyword syntax and description
Defines a simple field type.
Syntax
TYPES [()] [TYPE |LIKE ] [DECIMALS ].
Defines the internal data type in the program with length , reference to the ABAP
Dictionary type or a data object , and, where appropriate, with decimal
places.
Syntax
TYPES TYPE REF TO |.
Defines the internal data type in the program with reference to the class or the
interface .
TYPE-POOLS sap abap keyword syntax and description
Declares the types and constants of a type group to a program.
Syntax
TYPE-POOLS .
After this statement, you can use all of the data types and constants defined in the type group
in your program.
TYPE-POOL sap abap keyword syntax and description
Introduces a type group.
Syntax
TYPE-POOL .
The first statement in a type group. You do not have to enter this statement in the ABAP Editor -
instead, it is automatically inserted in the type group by the ABAP Dictionary. A type group is an
ABAP program containing type definitions and constant declarations that can then be used in
several different programs.
TRANSLATE sap abap keyword syntax and description
Converts characters in strings.
Syntax
TRANSLATE TO UPPER|LOWER CASE
|USING .
The characters of the string are converted into upper- or lowercase, or according to a
substitution rule specified in .
TRANSFER
Writes data to a file.
Syntax
TRANSFER TO [LENGTH ].
Writes the field to the file on the application server. The LENGTH addition specifies
the length of the data you want to transfer
TOP-OF-PAGE sap abap keyword syntax and description
Event keyword for defining an event block for a list event.
Syntax
TOP-OF-PAGE [DURING LINE-SELECTION].
Whenever a new page begins while a standard list is being created, the runtime environment
triggers the TOP-OF-PAGE event and the corresponding event block is executed. The addition
DURING LINE-SELECTION has the same function, but for detail lists.
TABLES
Declares an interface work area.
Syntax
TABLES .
Declares a structure with the same data type and name as a database table, a view, or a
structure from the ABAP Dictionary. Structures declared using TABLES in main programs and
subroutines use a common data area.
SUPPRESS DIALOG sap abap keyword syntax and description
Prevents the current screen from being displayed.
Syntax
SUPPRESS DIALOG.
Can only occur in a PBO dialog module. The screen is not displayed, but its flow logic is still
processed.
SUPPLY sap abap keyword syntax and description
Fills context instances with values.
Syntax
SUPPLY = ... = TO CONTEXT .
Fills the key fields of the context instance with the values .
SUPPRESS
Thursday, February 21, 2008
ABAP Keywords and their usage
Posted by Unknown at 5:25 PM
Labels: ABAP and JAVA
Subscribe to:
Post Comments (Atom)
Content
-
►
2009
(2)
- ► 09/06 - 09/13 (1)
- ► 03/01 - 03/08 (1)
-
▼
2008
(207)
- ► 11/23 - 11/30 (1)
- ► 04/20 - 04/27 (70)
- ► 04/13 - 04/20 (51)
- ► 03/16 - 03/23 (44)
- ► 02/24 - 03/02 (9)
-
▼
02/17 - 02/24
(32)
- SAP Scripts - Interview Questions
- ABAP Reports - Interview Questions
- ABAP Data Dictionary
- ABAP Dialog Programming FAQ Technical Interview Q...
- ABAP LOGICAL DATABASE Technical Interview Questions
- ABAP DATA DICTIONARY Technical Interview Questions
- BASIS LAYER Interview Questions
- SAP Terminology
- ABAP FAQs
- What is ABAP?
- ABAP Technical Interview Questions
- Break Points in ABAP
- After sending the data(any type) from SENDER to RE...
- ABAP Keywords and their usage
- Bill of Material Interview Questions
- Starting the debugger in a modal screen Using ABAP
- Retrieving field names dynamically using sap abap
- Restricting the selection screen using sap abap
- Calling an external program using sap abap
- Using a variable from a calling program without pa...
- Showing a progress bar in ABAP
- Generating your own standard F4 help using sap abap
- Creating an ALV Grid in 3 lines using sap abap
- Modifying the F4 standard calendar using sap abap
- Saving an internal table in Microsoft Excel format...
- Generating a number range automatically in sap
- Defining a local type dynamically using abap
- How to use macros in sap
- Using dynamic SELECT statements in sap abap
- How to use JavaScript in SAP ABAP?
- Managing persistent objects with object services I...
- Debugging ABAP programs from JAVA applications
No comments:
Post a Comment