SAP ERP ABAP SIMPLE OUTPUT STATEMENTS

Module Objectives

•Explain the WRITE statement
•Define text symbols
•Use system fields
•ABAP Expressions for WRITE Processing

Review on How to create an ABAP Program

ABAP Program

The WRITE Statement

Hello World Code

Text Symbols

Text symbols have the advantage of being translated to different languages depending on the logon language without further coding.

create text symbols

After maintenance, save and activate the text symbols.

System Fields

•System fields are variables filled by the ABAP runtime environment and can be used in an ABAP program to know system statuses.
•They should only be accessed on a read-only basis and not modified during runtime.

Examples:

  • sy-datum – system date
  • sy-datlo – user local date
  • sy-uname – user name
  • sy-langu – SAP logon language key
  • sy-uzeit – system time
  • sy-timlo – user local time
  • sy-repid – current ABAP program
  • sy-sysid – current SAP system
System field

ABAP Expressions for WRITE Processing

Using String Templates
•String templates enables us to create a new character string out of literal texts and embedded expressions.
•A string template is defined by using the | (pipe) symbol at the beginning and end of a template.

Example: 

WRITE:|This is a text.|.

has the same result as:

WRITE: 'This is a text.'.


ABAP Expressions for WRITE Processing

  • String templates become useful when combining literal texts with embedded expressions and control characters. Embedded expressions are defined within a string template with curly brackets { expression }.
  • An expression can be a data object, calculation expression, constructor expression, table expression, a functional method, a predefined function or method chaining.
  • ABAP Expressions will be discussed more in later modules.

Example:

string

Comments

Popular posts from this blog

SAP ABAP SELECT STATEMENT

SAP ADOBE FORMS

ABAP AUTHORIZATION CONCEPT