ABAP Programs: Simple Form
REPORT ZSOURCE1001.
* Global field of the program
DATA FLAG VALUE ‘G’.
* Displaying the global field
WRITE FLAG.
* Calling a form
PERFORM SET_FLAG.
* Displaying the global field again
WRITE FLAG.
* Defining a form
FORM SET_FLAG.
* Changing and displaying the global field
FLAG = ‘L’.
WRITE FLAG.
ENDFORM.
———————
ABAPer, mail: abap.community@gmail.com http://www.erpdb.info
If you like this post, you may as well like these too:
- ABAP Programs: Local data in a form REPORT ZSOURCE1002. * Global field of the programDATA FLAG VALUE ‘G’.* Displaying the global fieldWRITE FLAG.* Calling a formPERFORM WRITE_FLAG.* Displaying the global field againWRITE FLAG.* Defining a form with...
- ABAP Programs: Using interface parameters of a form REPORT ZSOURCE1004* Types and data for later useTYPES: T_NAME(20).DATA: NAME_1 TYPE T_NAME VALUE ‘A’, NAME_2 TYPE T_NAME VALUE ‘B’.* Calling a form with different parametersPERFORM SET_NAME CHANGING NAME_1.PERFORM SET_NAME CHANGING...
- ABAP Programs: Form parameters with generic types REPORT ZSOURCE1009.* Variable for later useDATA: SHORT_STRING(3) VALUE ‘AB’, SHORT_NUMBER(3) TYPE N VALUE ’0′, ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100.* Calling forms with different actual parameters* Correct call (actual paramter is...
- ABAP Programs: Type check for form parameters REPORT ZSOURCE1007.* Types and variables for later useTYPES: T_NAME_1(20), T_NAME_2(20).DATA: NAME_1 TYPE T_NAME_1, NAME_2 TYPE T_NAME_2.* Calling forms with different actual parametersPERFORM SET_NAME_LIKE CHANGING NAME_1.PERFORM SET_NAME_LIKE CHANGING NAME_2.PERFORM SET_NAME_TYPE CHANGING...
- ABAP Programs: Form parameters without type reference REPORT ZSOURCE1008.* Variable for later useDATA: STRING_1(2) VALUE ‘AB’, STRING_2(8) VALUE ‘ ABAP/4′.* Calling forms with different actual parametersPERFORM WRITE_FIRST_CHARACTER CHANGING: STRING_1, STRING_2.* Form parameters without type referenceFORM WRITE_FIRST_CHARACTER CHANGING...
- ABAP Programs: A simple query 1 2 3 4 5 6 7 REPORT ZSOURCE1101. * Work area for a database table TABLES CUSTOMERS. * Reading all entries of the database table SELECT * FROM CUSTOMERS....
- ABAP Programs: A simple internal table REPORT ZSOURCE1201.* Work area for a database tableTABLES CUSTOMERS.* Defining an internal tableDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100.* Reading all entries of the database table into the internal tableSELECT *...
- ABAP Programs: Simple examples of field conversion REPORT ZSOURCE0702. * Converting to numbers during computationsDATA: NUMBER_1(4) VALUE ’1771′, NUMBER_2(3), RESULT TYPE I. NUMBER_2 = ’005′.RESULT = NUMBER_1 + NUMBER_2.WRITE / RESULT. NUMBER_2 = ‘ 5′.RESULT = NUMBER_1...
- FORM: ABAP Keyword a day FORM: Defines a subroutine. Syntax FORM [USING ... [VALUE(][)] [TYPE |LIKE ]„. ] [CHANGING... [VALUE(][)] [TYPE |LIKE ]„. ]. Introduces a subroutine. The USING and CHANGING additions define the subroutine’s...
- ABAP Program: Dynamic external perform (call back form) Here the two programs which are calling dynamically. REPORT ZSOURCE2309. PERFORM EXTFORM IN PROGRAM ZSOURCE2310 USING 'CALL_BACK_FORM' SY-CPROG. FORM CALL_BACK_FORM. WRITE / 'I am the call back form in ZSOURCE2309.'....
- ABAP Source Code: Syntax of ABAP/4 Programs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 * Declaration...
- ABAP Programs: Exporting to the ABAP/4 Memory REPORT ZSOURCE1401. * Work areas TABLES: CUSTOMERS, BOOKINGS. * Internal tables which will be exported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH...
- ABAP Programs: Importing from the ABAP/4 Memory REPORT ZSOURCE1402. * Internal tables which will be imported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH HEADER LINE, NEW_BOOKINGS LIKE BOOKINGS OCCURS...
- Source Code: Few simple examples 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...
- Simple ALV Report – Details of Y or Z Objects 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...



















Leave a Reply