SAP Database - The Unofficial SAP Knowledge Base

Hi Guest!
You can contribute to SAP Database on any topic. SAP Database might be the right place for your Ideas/Opinions to reach a larger audience.

SAP Forums

New to SAP Database? Register Now
Already a member? Login
Social Bookmarks:

ABAP Programs: Type check for form parameters

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

REPORT ZSOURCE1007.
* Types and variables for later use
TYPES: 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 parameters
PERFORM SET_NAME_LIKE CHANGING NAME_1.
PERFORM SET_NAME_LIKE CHANGING NAME_2.

PERFORM SET_NAME_TYPE CHANGING NAME_1.
PERFORM SET_NAME_TYPE CHANGING NAME_2.
* Form definition with type reference via like
FORM SET_NAME_LIKE CHANGING F_NAME LIKE NAME_2.
F_NAME = ‘Smith’.
ENDFORM.
* Form definition with type reference via type
FORM SET_NAME_TYPE CHANGING F_NAME TYPE T_NAME_2.
F_NAME = ‘Smith’.
ENDFORM.

———————
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: Simple Form REPORT ZSOURCE1001. * Glob
  2. ABAP Programs: Using interface parameters of a form REPORT ZSOURCE1004* Types
  3. ABAP Programs: Classifying parameters REPORT ZSOURCE1005. * Data
  4. ABAP Programs: Form parameters without type reference REPORT ZSOURCE1008.* Varia
  5. ABAP Programs: Form parameters with generic types REPORT ZSOURCE1009.* Varia



Leave a Reply