ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

ABAP Programs: Simple Form

Print This Post Email This Post Written by admin on Nov 16th, 2007 | Filed under: ABAP Programs

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

Share

If you like this post, you may as well like these too:

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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....
  7. 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 *...
  8. 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...
  9. 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...
  10. 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.'....
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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