* Declaration of a work area for a Dictionary table
TABLES CUSTOMERS.
* Internal table used as snapshot of the database table
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.
* Reading the entries of the database table into an internal table
SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS.
* Displaying each line of an internal table
LOOP AT ALL_CUSTOMERS.
WRITE: / ALL_CUSTOMERS-NAME.
ENDLOOP.
*&---------------------------------------------------------------------*
* 1. Elementary types
Other Approach to define data type
DATA: CUSTOMER_NAME_1(25) TYPE C,
VENDOR_NAME_1(25) TYPE C.
* 2. Reference to an existing field
DATA: CUSTOMER_NAME_2(25) TYPE C,
VENDOR_NAME_2 LIKE CUSTOMER_NAME_2.
* 3. Reference to a non-elementary type
TYPES T_NAME(25) TYPE C.
DATA: CUSTOMER_NAME_3 TYPE T_NAME,
VENDOR_NAME_3 TYPE T_NAME.
ABAP,ABAP report,Interactive Report,ALV grid,ALV list,IDOC,User Exit,RFC,Smartform,sapscript,ABAP Performance,Remote Function Module( RFC ),Function Module,Modularization techniques,ABAP tools,ALV report Generator,ABAP Interview Questions,BDC,BAPI,ALE,BADI, EDI,InternalTable,DataStructure,LSMW,Domain,DataElement,Basis and Administration ,ABAP HR development,ABAP Debugger,BW,ExceptionHandling,Download FI, CO, MM, PP, SD, PM, PS, QM, SM, HR, BW, APO,ABAP Tutorial
Saturday, July 10, 2010
Working with database tables and internal tables
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment