Output formatting ABAP 7.4


Output formatting in ABAP 7.4, using CASE, DATE , ALIGN, ALPHA and WIDTH

A+ A-

Below are the some of the output formatting options with ABAP 7.4

Using text alignment ABAP 7.4

WRITE / |{ 'TEXT ALIGNED TO LEFTSIDE OF THE SCREEN' WIDTH = 200 ALIGN = LEFT } | .
WRITE / |{ 'TEXT ALIGNED TO CENTER OF THE SCREEN'   WIDTH = 100 ALIGN = CENTER }|.
WRITE / |{ 'TEXT ALIGNED TO RIGHTSIDE OF THE SCREEN'    WIDTH = 100 ALIGN = RIGHT  }|.

Using CASE ABAP 7.4

WRITE / |{ 'SAPnuts' CASE = (cl_abap_format=>c_raw) }|.
WRITE / |{ 'SAPnuts' CASE = (cl_abap_format=>c_upper) }|.
WRITE / |{ 'SAPnuts' CASE = (cl_abap_format=>c_lower) }|.

Using ALPHA conversion ABAP 7.4

DATA(lv_number) = '0000012345'.
WRITE / |{ lv_number  ALPHA = OUT }|.

DATE formatting ABAP 7.4

DATA(lv_date) = sy-datum.
WRITE / |{ lv_date DATE = ISO }|.           "Date Format YYYY-MM-DD
WRITE / |{ lv_date DATE = User }|.          "As per user settings
WRITE / |{ lv_date DATE = Environment }|.   "Formatting setting of language environment

Learner Questions

No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question


    Was this lesson helpful to you? Yes No 1 People out of 1 think this lesson helpful

    Lesson Navigation

    ←Previous Chapter
    Next Lesson → Reports Using Inline Declarations ABAP 7.4