Welcome to SAP Central
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Creating user defined types and structures in ABAP

Go down

Creating user defined types and structures in ABAP Empty Creating user defined types and structures in ABAP

Post  Uma_ABAP Sat Apr 28, 2012 8:55 pm

*&---------------------------------------------------------------------*
*& Report ZCH_USER_DEFINED_TYPES
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT ZCH_USER_DEFINED_TYPES.

TYPES: TXT TYPE STRING. " Creating user defined type using standard type

DATA: NAME TYPE TXT, " Using user defined type
CITY TYPE TXT.

TYPES: BEGIN OF ty_usr,
id TYPE n,
name TYPE txt,
age TYPE i,
city TYPE txt,
END OF ty_usr.

DATA: t_usr TYPE STANDARD TABLE OF ty_usr,
w_usr TYPE ty_usr.

name = 'Micheal'.
city = 'CA'.

WRITE: / name,
city.

w_usr-id = '001'.
w_usr-name = 'Micheal'.
w_usr-age = 24.
w_usr-city = 'CA'.

WRITE : / w_usr-id,
w_usr-name,
w_usr-age,
w_usr-city.

Uma_ABAP

Posts : 56
Join date : 2012-03-31

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum