SAP Database

ABAP Programs: Using static variables

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

REPORT ZSOURCE1003.
* Calling a form twice
PERFORM COUNT.
PERFORM COUNT.
* Defining a form with a static variable
FORM COUNT.
STATICS CALLS TYPE I.
CALLS = CALLS + 1.
WRITE CALLS.
ENDFORM.

~~~~~ end of post ~~~~~

———————
ABAPer, mail: abap.community@gmail.com http://abaplearner.blogspot.com

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

  1. ABAP Programs: Recursive calls REPORT ZSOURCE1011.* Variable for later useDATA: NUMBER TYPE I VALUE 5, RESULT TYPE I VALUE 1.* Calling a form from the main programPERFORM FACTORIAL.WRITE RESULT.* Defining a form with...
  2. ABAP Programs: Classifying parameters REPORT ZSOURCE1005. * Data declarations for later useDATA: A1 TYPE P VALUE 2, A2 TYPE P VALUE 4, A3 TYPE P VALUE 8.* Calling a form with different parameter...
  3. 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...
  4. 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...
  5. ABAP Programs: Simple Form REPORT ZSOURCE1001. * Global field of the programDATA FLAG VALUE ‘G’.* Displaying the global fieldWRITE FLAG.* Calling a formPERFORM SET_FLAG.* Displaying the global field againWRITE FLAG.* Defining a formFORM...



Leave a Reply

  • Help Support CRY