SAP S/4
ABAP Programming
for non-Technical Users
Create first ABAP Program
‘Hello World!’
Introduction to the ABAP Syntax
PARAMETERS and WRITE
SE10 is the customizing request to create, change, display and released Transport Request for Customizing and Developments works in the SAP system
Workbench request
are for ABAP developers working with ABAP Workbench
Customizing request
are for Functional Consultants working with Configurations in the IMG
Double-click the Request/Task
In the drop-down list,
Select “Package”
An ABAP package is a transportable ABAP repository object that groups development objects of an ABAP system.
Enter either existing package number or a NEW one,
if it is new, it will go to Create mode
If Package entered is NEW, the dialogue will request if it is to be created
Assign the Package Z00 to the Transport Request T41K934197 created in the previous section
Package Z00 and ready for Development work like Developing ABAP Programs
Check the Package in the Transport Organizer
the EMPTY (although empty) is assign to the TR T41K934197
Double-click
In SE80, make use Select Package environment and Package ID “Z00”
Right-click the Package “Z00” and select
Create - Program
in the Dialgoue
A top include is nothing more that an include program which should hold all of your global declarations, such as variables, internal tables, and type statements. An include program is nothing more than a program which is designed to be included in another larger program, sort of like a modularization technique.
Program name must start with
Y or Z
Due to the Login Language, ALL ‘Text Symbol’ and ‘Selection Text’ will be in English
set Status “Test Program”
Executable Program
system defaults to the Package Z00 and as the Package is already assign to the TR T41K934197, the new Program will be Release to Client destination via this TR
Coding section
ABAP Syntax
PARAMETERS
PARAMETERS in an ABAP statements which are used to declare input ABAP variables in ABAP Programs or Report,
in this case z_name is the variable (but the variable name cannot be more than 8 characters).
This will allow the User to provide values for variables through the input screen.
syntax
PARAMETERS - TYPE
allow the variable to define as data types which can be String, Integer, etc or even TABLE-FIELD
eg:
PARAMETERS: z_matgrp TYPE MARA-MATKL,
z_age TYPE integer,
z_name TYPE string.
Syntax
WRITE: ‘text_string’.
Display the text_string as output
Syntax
NEW_LINE.
create a line break
Syntax
WRITE: ‘text_string’, z_name.
with a comma, the WRITE statement can continue to write/display even variable
‘text_string’(abc)
(abc) behind text string is a Text Symbol for the purpose of preparing Language Specific Text for different language Login display of the text_string
Double-click the new Text symbol to SAVE/Generate it
Pool of Text Symbols are be seen here
Double-click the new Text symbol to SAVE/Generate it
2 Text Symbols generated
Activate both Source Code, Text Symbols, and any other Objects
the Selection Text, in this case the variable name have not setup any different Display Text yet
Direct processing (Execute)
the variable z_name
have to setup a different text display
Enter a different text display for the variable z_name
These text are from the source code
Translation to “ZH” for Text Symbols and Selection Texts
Enter the text in the language “ZH” for Text Symbols and Selection Texts
current LOGIN is “EN” (English)
current LOGIN is “ZH” (Chinese)
check the new Program in the Transport Organizer
Double-click to view the Source Code
Double-click to view the Transport Request (TR)
The Objects can be Release here
Objects in the TR are Released
notice the little “green tick” after the TR objects are Released
ABAP Programs can only be created/change/display using SE38
Tools in SE80 and SE38 for Program creation are similar
note the Package the Program was assigned automatically due to the method the Program was created in SE80