F WRITE format options in SAP ABAP | CodeTheta

WRITE format options in SAP ABAP

May 28, 2024

SAP has provided different options of text alignment.

-----------------------------------
For Left alignment text -

Code:
DATA: text TYPE char50.
WRITE 'Hello World - Left' TO text LEFT-JUSTIFIED.
cl_demo_output=>write( text ).
cl_demo_output=>display( ).
-----------------------------------
For Right alignment text -

Code:
DATA: text TYPE char50.
WRITE 'Hello World - Right'  TO text RIGHT-JUSTIFIED.
cl_demo_output=>write( text ).
cl_demo_output=>display( ).
-----------------------------------
For Center alignment text -

Code:
DATA: text TYPE char50.
WRITE 'Hello World - Center' TO text CENTERED.
cl_demo_output=>write( text ).
cl_demo_output=>display( ).
-----------------------------------

IDE Used To Test This Code : SAP ABAP Editor.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us. We will reply you as soon as possible.

Post a Comment